Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS to future-incompat report

This commit is contained in:
Aaron Hill 2022-10-22 17:28:08 -05:00
parent 005fc0f00f
commit dc8876196b
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
7 changed files with 221 additions and 0 deletions

View File

@ -2948,6 +2948,7 @@
"trailing semicolon in macro body used as expression",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #79813 <https://github.com/rust-lang/rust/issues/79813>",
reason: FutureIncompatibilityReason::FutureReleaseErrorReportNow,
};
}

View File

@ -46,3 +46,140 @@ LL | let _ = #[allow(semicolon_in_expressions_from_macros)] foo!(allow_does_
warning: 3 warnings emitted
Future incompatibility report: Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/semicolon-in-expressions-from-macros.rs:9:13
|
LL | true;
| ^
...
LL | foo!(first)
| ----------- in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/semicolon-in-expressions-from-macros.rs:24:13
|
LL | #[allow(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/semicolon-in-expressions-from-macros.rs:9:13
|
LL | true;
| ^
...
LL | let _ = foo!(second);
| ------------ in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/semicolon-in-expressions-from-macros.rs:29:13
|
LL | #[allow(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/semicolon-in-expressions-from-macros.rs:9:13
|
LL | true;
| ^
...
LL | let _ = foo!(third);
| ----------- in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/semicolon-in-expressions-from-macros.rs:32:13
|
LL | #[allow(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/semicolon-in-expressions-from-macros.rs:9:13
|
LL | true;
| ^
...
LL | let _ = foo!(fourth);
| ------------ in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/semicolon-in-expressions-from-macros.rs:37:13
|
LL | #[allow(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/semicolon-in-expressions-from-macros.rs:9:13
|
LL | true;
| ^
...
LL | foo!(warn_in_block)
| ------------------- in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/semicolon-in-expressions-from-macros.rs:4:9
|
LL | #![warn(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/semicolon-in-expressions-from-macros.rs:9:13
|
LL | true;
| ^
...
LL | let _ = foo!(warn_in_expr);
| ------------------ in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/semicolon-in-expressions-from-macros.rs:4:9
|
LL | #![warn(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/semicolon-in-expressions-from-macros.rs:9:13
|
LL | true;
| ^
...
LL | let _ = #[allow(semicolon_in_expressions_from_macros)] foo!(allow_does_not_work);
| ------------------------- in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/semicolon-in-expressions-from-macros.rs:4:9
|
LL | #![warn(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -14,3 +14,18 @@ LL | _ => foo!()
warning: 1 warning emitted
Future incompatibility report: Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/warn-semicolon-in-expressions-from-macros.rs:6:13
|
LL | true;
| ^
...
LL | _ => foo!()
| ------ in this macro invocation
|
= 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: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -18,3 +18,22 @@ LL | #![deny(semicolon_in_expressions_from_macros)]
error: aborting due to previous error
Future incompatibility report: Future breakage diagnostic:
error: trailing semicolon in macro used in expression position
--> $DIR/issue-84195-lint-anon-const.rs:8:14
|
LL | () => { 0; };
| ^
...
LL | let val: [u8; len!()] = [];
| ------ in this macro invocation
|
= 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: the lint level is defined here
--> $DIR/issue-84195-lint-anon-const.rs:5:9
|
LL | #![deny(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `len` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -16,3 +16,20 @@ LL | expand_it!()
warning: 1 warning emitted
Future incompatibility report: Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/lint-trailing-macro-call.rs:9:25
|
LL | #[cfg(FALSE)] 25;
| ^
...
LL | expand_it!()
| ------------ in this macro invocation
|
= 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 `expand_it`
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= note: this warning originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -82,3 +82,18 @@ error: aborting due to 6 previous errors; 1 warning emitted
Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.
Future incompatibility report: Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/macro-context.rs:3:15
|
LL | () => ( i ; typeof );
| ^
...
LL | let i = m!();
| ---- in this macro invocation
|
= 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: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -31,3 +31,20 @@ LL | foo!()
error: aborting due to previous error; 1 warning emitted
Future incompatibility report: Future breakage diagnostic:
warning: trailing semicolon in macro used in expression position
--> $DIR/macro-in-expression-context.rs:5:29
|
LL | assert_eq!("A", "A");
| ^
...
LL | foo!()
| ------ in this macro invocation
|
= 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: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)