Skip to content

Commit cf5eb27

Browse files
committed
mbe: Restructure macro_metavar_expr tests
These tests have expanded beyond the RFC, so rename the directory `rfc-3086-metavar-expr` to `metavar-expressions`. `concat` (which wasn't part of the RFC) now fits in this group, so merge its tests into the `metavar-expressions` directory. Additionally rename some related `issue-*` tests.
1 parent 22be76b commit cf5eb27

23 files changed

+57
-56
lines changed

src/tools/tidy/src/issues.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2849,7 +2849,6 @@ ui/macros/issue-98466.rs
28492849
ui/macros/issue-99261.rs
28502850
ui/macros/issue-99265.rs
28512851
ui/macros/issue-99907.rs
2852-
ui/macros/rfc-3086-metavar-expr/issue-111904.rs
28532852
ui/malformed/issue-107423-unused-delim-only-one-no-pair.rs
28542853
ui/malformed/issue-69341-malformed-derive-inert.rs
28552854
ui/marker_trait_attr/issue-61651-type-mismatch.rs

tests/ui/macros/macro-metavar-expr-concat/hygiene.stderr renamed to tests/ui/macros/metavar-expressions/concat-hygiene.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0425]: cannot find value `abcdef` in this scope
2-
--> $DIR/hygiene.rs:5:10
2+
--> $DIR/concat-hygiene.rs:5:10
33
|
44
LL | ${concat($lhs, $rhs)}
55
| ^^^^^^^^^^^^^^^^^^^^ not found in this scope

tests/ui/macros/macro-metavar-expr-concat/raw-identifiers.stderr renamed to tests/ui/macros/metavar-expressions/concat-raw-identifiers.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
11
error: expected identifier or string literal
2-
--> $DIR/raw-identifiers.rs:28:22
2+
--> $DIR/concat-raw-identifiers.rs:28:22
33
|
44
LL | let ${concat(r#abc, abc)}: () = ();
55
| ^^^^^
66

77
error: expected identifier or string literal
8-
--> $DIR/raw-identifiers.rs:32:27
8+
--> $DIR/concat-raw-identifiers.rs:32:27
99
|
1010
LL | let ${concat(abc, r#abc)}: () = ();
1111
| ^^^^^
1212

1313
error: expected identifier or string literal
14-
--> $DIR/raw-identifiers.rs:35:22
14+
--> $DIR/concat-raw-identifiers.rs:35:22
1515
|
1616
LL | let ${concat(r#abc, r#abc)}: () = ();
1717
| ^^^^^
1818

1919
error: `${concat(..)}` currently does not support raw identifiers
20-
--> $DIR/raw-identifiers.rs:5:28
20+
--> $DIR/concat-raw-identifiers.rs:5:28
2121
|
2222
LL | let ${concat(abc, $rhs)}: () = ();
2323
| ^^^
2424

2525
error: `${concat(..)}` currently does not support raw identifiers
26-
--> $DIR/raw-identifiers.rs:12:23
26+
--> $DIR/concat-raw-identifiers.rs:12:23
2727
|
2828
LL | let ${concat($lhs, abc)}: () = ();
2929
| ^^^
3030

3131
error: `${concat(..)}` currently does not support raw identifiers
32-
--> $DIR/raw-identifiers.rs:19:23
32+
--> $DIR/concat-raw-identifiers.rs:19:23
3333
|
3434
LL | let ${concat($lhs, $rhs)}: () = ();
3535
| ^^^
3636

3737
error: `${concat(..)}` currently does not support raw identifiers
38-
--> $DIR/raw-identifiers.rs:19:29
38+
--> $DIR/concat-raw-identifiers.rs:19:29
3939
|
4040
LL | let ${concat($lhs, $rhs)}: () = ();
4141
| ^^^
4242

4343
error: `${concat(..)}` currently does not support raw identifiers
44-
--> $DIR/raw-identifiers.rs:19:23
44+
--> $DIR/concat-raw-identifiers.rs:19:23
4545
|
4646
LL | let ${concat($lhs, $rhs)}: () = ();
4747
| ^^^
4848
|
4949
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
5050

5151
error: `${concat(..)}` currently does not support raw identifiers
52-
--> $DIR/raw-identifiers.rs:42:28
52+
--> $DIR/concat-raw-identifiers.rs:42:28
5353
|
5454
LL | let ${concat(abc, $rhs)}: () = ();
5555
| ^^^
5656

5757
error: `${concat(..)}` currently does not support raw identifiers
58-
--> $DIR/raw-identifiers.rs:49:23
58+
--> $DIR/concat-raw-identifiers.rs:49:23
5959
|
6060
LL | let ${concat($lhs, abc)}: () = ();
6161
| ^^^
6262

6363
error: `${concat(..)}` currently does not support raw identifiers
64-
--> $DIR/raw-identifiers.rs:56:23
64+
--> $DIR/concat-raw-identifiers.rs:56:23
6565
|
6666
LL | let ${concat($lhs, $rhs)}: () = ();
6767
| ^^^
6868

6969
error: `${concat(..)}` currently does not support raw identifiers
70-
--> $DIR/raw-identifiers.rs:56:29
70+
--> $DIR/concat-raw-identifiers.rs:56:29
7171
|
7272
LL | let ${concat($lhs, $rhs)}: () = ();
7373
| ^^^
7474

7575
error: `${concat(..)}` currently does not support raw identifiers
76-
--> $DIR/raw-identifiers.rs:56:23
76+
--> $DIR/concat-raw-identifiers.rs:56:23
7777
|
7878
LL | let ${concat($lhs, $rhs)}: () = ();
7979
| ^^^
8080
|
8181
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
8282

8383
error: expected pattern, found `$`
84-
--> $DIR/raw-identifiers.rs:28:13
84+
--> $DIR/concat-raw-identifiers.rs:28:13
8585
|
8686
LL | let ${concat(r#abc, abc)}: () = ();
8787
| ^ expected pattern

tests/ui/macros/macro-metavar-expr-concat/repetitions.stderr renamed to tests/ui/macros/metavar-expressions/concat-repetitions.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: invalid syntax
2-
--> $DIR/repetitions.rs:14:20
2+
--> $DIR/concat-repetitions.rs:14:20
33
|
44
LL | const ${concat($a, Z)}: i32 = 3;
55
| ^^^^^^^^^^^^^^^
66

77
error: invalid syntax
8-
--> $DIR/repetitions.rs:22:17
8+
--> $DIR/concat-repetitions.rs:22:17
99
|
1010
LL | read::<${concat($t, $en)}>()
1111
| ^^^^^^^^^^^^^^^^^
1212

1313
error: invalid syntax
14-
--> $DIR/repetitions.rs:22:17
14+
--> $DIR/concat-repetitions.rs:22:17
1515
|
1616
LL | read::<${concat($t, $en)}>()
1717
| ^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)