You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #144369 - joshtriplett:mbe-expr-semi-deny-by-default, r=petrochenkov
Upgrade semicolon_in_expressions_from_macros from warn to deny
This is already warn-by-default, and a future compatibility warning (FCW) that warns in dependencies. Upgrade it to deny-by-default, as the next step towards hard error.
Per #79813 (comment)
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
11
11
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
12
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
13
-
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
12
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
13
+
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
28
28
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
29
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
30
-
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
29
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
30
+
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: trailing semicolon in macro used in expression position
2
-
--> $DIR/lint-trailing-macro-call.rs:9:25
1
+
error: trailing semicolon in macro used in expression position
2
+
--> $DIR/lint-trailing-macro-call.rs:7:25
3
3
|
4
4
LL | #[cfg(false)] 25;
5
5
| ^
@@ -11,14 +11,14 @@ LL | expand_it!()
11
11
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
12
12
= note: macro invocations at the end of a block are treated as expressions
13
13
= note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it`
14
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
15
-
= note: this warning originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
14
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
15
+
= note: this error originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: trailing semicolon in macro used in expression position
21
-
--> $DIR/lint-trailing-macro-call.rs:9:25
20
+
error: trailing semicolon in macro used in expression position
21
+
--> $DIR/lint-trailing-macro-call.rs:7:25
22
22
|
23
23
LL | #[cfg(false)] 25;
24
24
| ^
@@ -30,6 +30,6 @@ LL | expand_it!()
30
30
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
31
31
= note: macro invocations at the end of a block are treated as expressions
32
32
= note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it`
33
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
34
-
= note: this warning originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
33
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
34
+
= note: this error originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: tests/ui/macros/macro-context.stderr
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ LL | let i = m!();
64
64
|
65
65
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
66
66
67
-
warning: trailing semicolon in macro used in expression position
67
+
error: trailing semicolon in macro used in expression position
68
68
--> $DIR/macro-context.rs:3:15
69
69
|
70
70
LL | () => ( i ; typeof );
@@ -75,15 +75,15 @@ LL | let i = m!();
75
75
|
76
76
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
77
77
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
78
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
79
-
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
78
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
79
+
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
80
80
81
-
error: aborting due to 6 previous errors; 1 warning emitted
81
+
error: aborting due to 7 previous errors
82
82
83
83
Some errors have detailed explanations: E0412, E0425.
84
84
For more information about an error, try `rustc --explain E0412`.
warning: trailing semicolon in macro used in expression position
86
+
error: trailing semicolon in macro used in expression position
87
87
--> $DIR/macro-context.rs:3:15
88
88
|
89
89
LL | () => ( i ; typeof );
@@ -94,6 +94,6 @@ LL | let i = m!();
94
94
|
95
95
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
96
96
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
97
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
98
-
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
97
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
98
+
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: tests/ui/macros/macro-in-expression-context.stderr
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ help: you might be missing a semicolon here
13
13
LL | foo!();
14
14
| +
15
15
16
-
warning: trailing semicolon in macro used in expression position
16
+
error: trailing semicolon in macro used in expression position
17
17
--> $DIR/macro-in-expression-context.rs:5:29
18
18
|
19
19
LL | assert_eq!("A", "A");
@@ -26,13 +26,13 @@ LL | foo!()
26
26
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
27
27
= note: macro invocations at the end of a block are treated as expressions
28
28
= note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo`
29
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
30
-
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
29
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
30
+
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
31
31
32
-
error: aborting due to 1 previous error; 1 warning emitted
warning: trailing semicolon in macro used in expression position
35
+
error: trailing semicolon in macro used in expression position
36
36
--> $DIR/macro-in-expression-context.rs:5:29
37
37
|
38
38
LL | assert_eq!("A", "A");
@@ -45,6 +45,6 @@ LL | foo!()
45
45
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
46
46
= note: macro invocations at the end of a block are treated as expressions
47
47
= note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo`
48
-
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
49
-
= note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
48
+
= note: `#[deny(semicolon_in_expressions_from_macros)]` on by default
49
+
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments