Skip to content

Commit 6954f9d

Browse files
committed
Update stderr
1 parent cf167c9 commit 6954f9d

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/test/ui/macros/macro-in-expression-context.fixed

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ macro_rules! foo {
55
assert_eq!("A", "A");
66
//~^ WARN trailing semicolon in macro
77
//~| WARN this was previously
8+
//~| NOTE macro invocations at the end of a block
9+
//~| NOTE to ignore the value produced by the macro
810
//~| NOTE for more information
911
//~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default
1012
assert_eq!("B", "B");
@@ -20,4 +22,6 @@ fn main() {
2022
//~| NOTE in this expansion
2123
//~| NOTE in this expansion
2224
//~| NOTE in this expansion
25+
//~| NOTE in this expansion
26+
//~| NOTE in this expansion
2327
}

src/test/ui/macros/macro-in-expression-context.rs

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ macro_rules! foo {
55
assert_eq!("A", "A");
66
//~^ WARN trailing semicolon in macro
77
//~| WARN this was previously
8+
//~| NOTE macro invocations at the end of a block
9+
//~| NOTE to ignore the value produced by the macro
810
//~| NOTE for more information
911
//~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default
1012
assert_eq!("B", "B");
@@ -20,4 +22,6 @@ fn main() {
2022
//~| NOTE in this expansion
2123
//~| NOTE in this expansion
2224
//~| NOTE in this expansion
25+
//~| NOTE in this expansion
26+
//~| NOTE in this expansion
2327
}

src/test/ui/macros/macro-in-expression-context.stderr

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: macro expansion ignores token `assert_eq` and any following
2-
--> $DIR/macro-in-expression-context.rs:10:9
2+
--> $DIR/macro-in-expression-context.rs:12:9
33
|
44
LL | assert_eq!("B", "B");
55
| ^^^^^^^^^
@@ -23,6 +23,8 @@ LL | foo!()
2323
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
2424
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
2525
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
26+
= note: macro invocations at the end of a block are treated as expressions
27+
= note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo`
2628
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
2729

2830
error: aborting due to previous error; 1 warning emitted

0 commit comments

Comments
 (0)