Skip to content

Commit 5498fd1

Browse files
authored
Unrolled build for rust-lang#128122
Rollup merge of rust-lang#128122 - tgross35:missing-fragment-specifier-unconditional, r=petrochenkov Mark `missing_fragment_specifier` as `FutureReleaseErrorReportInDeps` We are moving toward forbidding `missing_fragment_specifier` either in edition 2024 or unconditionally. Make a first step toward this by ensuring crates that rely on the old behavior are reported when used as dependencies. Tracking issue: <rust-lang#128143>
2 parents c1a6199 + c9886a1 commit 5498fd1

File tree

7 files changed

+116
-1
lines changed

7 files changed

+116
-1
lines changed

Diff for: compiler/rustc_lint_defs/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ declare_lint! {
14241424
Deny,
14251425
"detects missing fragment specifiers in unused `macro_rules!` patterns",
14261426
@future_incompatible = FutureIncompatibleInfo {
1427-
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
1427+
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
14281428
reference: "issue #40107 <https://github.com./rust-lang/rust/issues/40107>",
14291429
};
14301430
}

Diff for: tests/ui/lint/expansion-time.stderr

+15
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@ LL | #[warn(incomplete_include)]
5555
warning: 4 warnings emitted
5656

5757
Future incompatibility report: Future breakage diagnostic:
58+
warning: missing fragment specifier
59+
--> $DIR/expansion-time.rs:9:19
60+
|
61+
LL | macro_rules! m { ($i) => {} }
62+
| ^^
63+
|
64+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
65+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
66+
note: the lint level is defined here
67+
--> $DIR/expansion-time.rs:8:8
68+
|
69+
LL | #[warn(missing_fragment_specifier)]
70+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
71+
72+
Future breakage diagnostic:
5873
warning: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable
5974
--> $DIR/expansion-time.rs:14:7
6075
|

Diff for: tests/ui/macros/issue-39404.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,14 @@ LL | macro_rules! m { ($i) => {} }
1010

1111
error: aborting due to 1 previous error
1212

13+
Future incompatibility report: Future breakage diagnostic:
14+
error: missing fragment specifier
15+
--> $DIR/issue-39404.rs:3:19
16+
|
17+
LL | macro_rules! m { ($i) => {} }
18+
| ^^
19+
|
20+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
22+
= note: `#[deny(missing_fragment_specifier)]` on by default
23+

Diff for: tests/ui/macros/macro-match-nonterminal.stderr

+22
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,25 @@ LL | ($a, $b) => {
2525

2626
error: aborting due to 3 previous errors
2727

28+
Future incompatibility report: Future breakage diagnostic:
29+
error: missing fragment specifier
30+
--> $DIR/macro-match-nonterminal.rs:2:8
31+
|
32+
LL | ($a, $b) => {
33+
| ^
34+
|
35+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
37+
= note: `#[deny(missing_fragment_specifier)]` on by default
38+
39+
Future breakage diagnostic:
40+
error: missing fragment specifier
41+
--> $DIR/macro-match-nonterminal.rs:2:10
42+
|
43+
LL | ($a, $b) => {
44+
| ^^
45+
|
46+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
47+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
48+
= note: `#[deny(missing_fragment_specifier)]` on by default
49+

Diff for: tests/ui/macros/macro-missing-fragment-deduplication.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ LL | ($name) => {}
1616

1717
error: aborting due to 2 previous errors
1818

19+
Future incompatibility report: Future breakage diagnostic:
20+
error: missing fragment specifier
21+
--> $DIR/macro-missing-fragment-deduplication.rs:4:6
22+
|
23+
LL | ($name) => {}
24+
| ^^^^^
25+
|
26+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
28+
= note: `#[deny(missing_fragment_specifier)]` on by default
29+

Diff for: tests/ui/macros/macro-missing-fragment.stderr

+45
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,48 @@ LL | ( $name ) => {};
3838

3939
error: aborting due to 1 previous error; 3 warnings emitted
4040

41+
Future incompatibility report: Future breakage diagnostic:
42+
warning: missing fragment specifier
43+
--> $DIR/macro-missing-fragment.rs:4:20
44+
|
45+
LL | ( $( any_token $field_rust_type )* ) => {};
46+
| ^^^^^^^^^^^^^^^^
47+
|
48+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
49+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
50+
note: the lint level is defined here
51+
--> $DIR/macro-missing-fragment.rs:1:9
52+
|
53+
LL | #![warn(missing_fragment_specifier)]
54+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
55+
56+
Future breakage diagnostic:
57+
warning: missing fragment specifier
58+
--> $DIR/macro-missing-fragment.rs:12:7
59+
|
60+
LL | ( $name ) => {};
61+
| ^^^^^
62+
|
63+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
64+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
65+
note: the lint level is defined here
66+
--> $DIR/macro-missing-fragment.rs:1:9
67+
|
68+
LL | #![warn(missing_fragment_specifier)]
69+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
70+
71+
Future breakage diagnostic:
72+
warning: missing fragment specifier
73+
--> $DIR/macro-missing-fragment.rs:18:7
74+
|
75+
LL | ( $name ) => {};
76+
| ^^^^^
77+
|
78+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
79+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
80+
note: the lint level is defined here
81+
--> $DIR/macro-missing-fragment.rs:1:9
82+
|
83+
LL | #![warn(missing_fragment_specifier)]
84+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
85+

Diff for: tests/ui/parser/macro/issue-33569.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ LL | { $+ } => {
2828

2929
error: aborting due to 4 previous errors
3030

31+
Future incompatibility report: Future breakage diagnostic:
32+
error: missing fragment specifier
33+
--> $DIR/issue-33569.rs:2:8
34+
|
35+
LL | { $+ } => {
36+
| ^
37+
|
38+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39+
= note: for more information, see issue #40107 <https://github.com./rust-lang/rust/issues/40107>
40+
= note: `#[deny(missing_fragment_specifier)]` on by default
41+

0 commit comments

Comments
 (0)