Update stderr

This commit is contained in:
Aaron Hill 2021-07-27 17:50:18 -05:00
parent cf167c9c9c
commit 6954f9d4f2
No known key found for this signature in database
GPG key ID: B4087E510E98B164
3 changed files with 11 additions and 1 deletions

View file

@ -5,6 +5,8 @@ macro_rules! foo {
assert_eq!("A", "A");
//~^ WARN trailing semicolon in macro
//~| WARN this was previously
//~| NOTE macro invocations at the end of a block
//~| NOTE to ignore the value produced by the macro
//~| NOTE for more information
//~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default
assert_eq!("B", "B");
@ -20,4 +22,6 @@ fn main() {
//~| NOTE in this expansion
//~| NOTE in this expansion
//~| NOTE in this expansion
//~| NOTE in this expansion
//~| NOTE in this expansion
}

View file

@ -5,6 +5,8 @@ macro_rules! foo {
assert_eq!("A", "A");
//~^ WARN trailing semicolon in macro
//~| WARN this was previously
//~| NOTE macro invocations at the end of a block
//~| NOTE to ignore the value produced by the macro
//~| NOTE for more information
//~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default
assert_eq!("B", "B");
@ -20,4 +22,6 @@ fn main() {
//~| NOTE in this expansion
//~| NOTE in this expansion
//~| NOTE in this expansion
//~| NOTE in this expansion
//~| NOTE in this expansion
}

View file

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