about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-07 14:45:53 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-07 19:13:30 +0300
commitb86b3fb640e4f914db9013872e8ff67b74ba286d (patch)
tree74f5a8f08cebe2a9ba3c6dd112004632898dd9c9 /tests/ui
parent42048ea12298da75415ce0c2b25a381bbe81eade (diff)
downloadrust-b86b3fb640e4f914db9013872e8ff67b74ba286d.tar.gz
rust-b86b3fb640e4f914db9013872e8ff67b74ba286d.zip
compiletest: Always preserve kind for compiler diagnostics
Those that didn't previously preserved kind are now marked as not requiring annotations to keep the previous behavior.

Also, do not lose diagnostics with an empty message.

Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/proc-macro/issue-91800.rs3
-rw-r--r--tests/ui/proc-macro/issue-91800.stderr8
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/ui/proc-macro/issue-91800.rs b/tests/ui/proc-macro/issue-91800.rs
index bc78bcacfd0..8cecfad32b5 100644
--- a/tests/ui/proc-macro/issue-91800.rs
+++ b/tests/ui/proc-macro/issue-91800.rs
@@ -6,11 +6,14 @@ extern crate issue_91800_macro;
 #[derive(MyTrait)]
 //~^ ERROR macros that expand to items must be delimited with braces or followed by a semicolon
 //~| ERROR proc-macro derive produced unparsable tokens
+//~| ERROR
 #[attribute_macro]
 //~^ ERROR macros that expand to items must be delimited with braces or followed by a semicolon
+//~| ERROR
 struct MyStruct;
 
 fn_macro! {}
 //~^ ERROR macros that expand to items must be delimited with braces or followed by a semicolon
+//~| ERROR
 
 fn main() {}
diff --git a/tests/ui/proc-macro/issue-91800.stderr b/tests/ui/proc-macro/issue-91800.stderr
index d831d62e919..63ebc0a552e 100644
--- a/tests/ui/proc-macro/issue-91800.stderr
+++ b/tests/ui/proc-macro/issue-91800.stderr
@@ -21,7 +21,7 @@ LL | #[derive(MyTrait)]
    = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:9:1
+  --> $DIR/issue-91800.rs:10:1
    |
 LL | #[attribute_macro]
    | ^^^^^^^^^^^^^^^^^^
@@ -29,7 +29,7 @@ LL | #[attribute_macro]
    = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: 
-  --> $DIR/issue-91800.rs:9:1
+  --> $DIR/issue-91800.rs:10:1
    |
 LL | #[attribute_macro]
    | ^^^^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL | #[attribute_macro]
    = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: macros that expand to items must be delimited with braces or followed by a semicolon
-  --> $DIR/issue-91800.rs:13:1
+  --> $DIR/issue-91800.rs:15:1
    |
 LL | fn_macro! {}
    | ^^^^^^^^^^^^
@@ -45,7 +45,7 @@ LL | fn_macro! {}
    = note: this error originates in the macro `fn_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: 
-  --> $DIR/issue-91800.rs:13:1
+  --> $DIR/issue-91800.rs:15:1
    |
 LL | fn_macro! {}
    | ^^^^^^^^^^^^