about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-22 06:09:14 +0000
committerbors <bors@rust-lang.org>2025-02-22 06:09:14 +0000
commitb6d3be4948e92fce0236cbbe22b55c55f6950269 (patch)
tree3c8af4fa30f003850f9cc7b4f93c4db3e5e1bf0a /tests/ui/parser
parentb87eda7fdf8034c52b3abef52b443b8573484eda (diff)
parent0f490b040af82820e423a7e71e0e2e1f6ca7ab57 (diff)
Auto merge of #133436 - nnethercote:rm-NtVis-NtTy, r=petrochenkov
Remove `NtVis` and `NtTy`

The next part of #124141. The first actual remove of `Nonterminal` variants. `NtVis` is a simple case that doesn't get much use, but `NtTy` is more complex.

r? `@petrochenkov`
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/macro/issue-37113.rs2
-rw-r--r--tests/ui/parser/macro/issue-37113.stderr4
-rw-r--r--tests/ui/parser/macro/trait-object-macro-matcher.rs1
-rw-r--r--tests/ui/parser/macro/trait-object-macro-matcher.stderr10
4 files changed, 13 insertions, 4 deletions
diff --git a/tests/ui/parser/macro/issue-37113.rs b/tests/ui/parser/macro/issue-37113.rs
index 0044aa5610f..e0957542f8f 100644
--- a/tests/ui/parser/macro/issue-37113.rs
+++ b/tests/ui/parser/macro/issue-37113.rs
@@ -1,7 +1,7 @@
 macro_rules! test_macro {
     ( $( $t:ty ),* $(),*) => {
         enum SomeEnum {
-            $( $t, )* //~ ERROR expected identifier, found `String`
+            $( $t, )* //~ ERROR expected identifier, found metavariable
         };
     };
 }
diff --git a/tests/ui/parser/macro/issue-37113.stderr b/tests/ui/parser/macro/issue-37113.stderr
index 1f2fe23106a..560329df5cc 100644
--- a/tests/ui/parser/macro/issue-37113.stderr
+++ b/tests/ui/parser/macro/issue-37113.stderr
@@ -1,10 +1,10 @@
-error: expected identifier, found `String`
+error: expected identifier, found metavariable
   --> $DIR/issue-37113.rs:4:16
    |
 LL |         enum SomeEnum {
    |              -------- while parsing this enum
 LL |             $( $t, )*
-   |                ^^ expected identifier
+   |                ^^ expected identifier, found metavariable
 ...
 LL |     test_macro!(String,);
    |     -------------------- in this macro invocation
diff --git a/tests/ui/parser/macro/trait-object-macro-matcher.rs b/tests/ui/parser/macro/trait-object-macro-matcher.rs
index 560195977d0..d4ec199070e 100644
--- a/tests/ui/parser/macro/trait-object-macro-matcher.rs
+++ b/tests/ui/parser/macro/trait-object-macro-matcher.rs
@@ -10,5 +10,6 @@ macro_rules! m {
 fn main() {
     m!('static);
     //~^ ERROR lifetime in trait object type must be followed by `+`
+    //~| ERROR lifetime in trait object type must be followed by `+`
     //~| ERROR at least one trait is required for an object type
 }
diff --git a/tests/ui/parser/macro/trait-object-macro-matcher.stderr b/tests/ui/parser/macro/trait-object-macro-matcher.stderr
index 40082564bad..81dca6f71c4 100644
--- a/tests/ui/parser/macro/trait-object-macro-matcher.stderr
+++ b/tests/ui/parser/macro/trait-object-macro-matcher.stderr
@@ -4,12 +4,20 @@ error: lifetime in trait object type must be followed by `+`
 LL |     m!('static);
    |        ^^^^^^^
 
+error: lifetime in trait object type must be followed by `+`
+  --> $DIR/trait-object-macro-matcher.rs:11:8
+   |
+LL |     m!('static);
+   |        ^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
 error[E0224]: at least one trait is required for an object type
   --> $DIR/trait-object-macro-matcher.rs:11:8
    |
 LL |     m!('static);
    |        ^^^^^^^
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0224`.