Skip to content

Commit b9acee2

Browse files
committed
make soft_unstable show up in future breakage reports
1 parent 56ada88 commit b9acee2

File tree

5 files changed

+60
-1
lines changed

5 files changed

+60
-1
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ declare_lint! {
24572457
Deny,
24582458
"a feature gate that doesn't break dependent crates",
24592459
@future_incompatible = FutureIncompatibleInfo {
2460-
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
2460+
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
24612461
reference: "issue #64266 <https://github.com/rust-lang/rust/issues/64266>",
24622462
};
24632463
}

tests/ui/feature-gates/bench.stderr

+22
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,25 @@ LL | use bench as _;
1919

2020
error: aborting due to 2 previous errors
2121

22+
Future incompatibility report: Future breakage diagnostic:
23+
error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable
24+
--> $DIR/bench.rs:3:3
25+
|
26+
LL | #[bench]
27+
| ^^^^^
28+
|
29+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
30+
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
31+
= note: `#[deny(soft_unstable)]` on by default
32+
33+
Future breakage diagnostic:
34+
error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable
35+
--> $DIR/bench.rs:7:5
36+
|
37+
LL | use bench as _;
38+
| ^^^^^
39+
|
40+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41+
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
42+
= note: `#[deny(soft_unstable)]` on by default
43+

tests/ui/lint/expansion-time.stderr

+15
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,18 @@ LL | #[warn(incomplete_include)]
5454

5555
warning: 4 warnings emitted
5656

57+
Future incompatibility report: Future breakage diagnostic:
58+
warning: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable
59+
--> $DIR/expansion-time.rs:14:7
60+
|
61+
LL | #[bench]
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 #64266 <https://github.com/rust-lang/rust/issues/64266>
66+
note: the lint level is defined here
67+
--> $DIR/expansion-time.rs:12:8
68+
|
69+
LL | #[warn(soft_unstable)]
70+
| ^^^^^^^^^^^^^
71+

tests/ui/proc-macro/inner-attr-non-inline-mod.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,14 @@ LL | #![rustfmt::skip]
3838
error: aborting due to 4 previous errors
3939

4040
For more information about this error, try `rustc --explain E0658`.
41+
Future incompatibility report: Future breakage diagnostic:
42+
error: custom inner attributes are unstable
43+
--> $DIR/module_with_attrs.rs:3:4
44+
|
45+
LL | #![rustfmt::skip]
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 #64266 <https://github.com/rust-lang/rust/issues/64266>
50+
= note: `#[deny(soft_unstable)]` on by default
51+

tests/ui/proc-macro/proc-macro-gates.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,14 @@ LL | #![test]
8989
error: aborting due to 10 previous errors
9090

9191
For more information about this error, try `rustc --explain E0658`.
92+
Future incompatibility report: Future breakage diagnostic:
93+
error: inner macro attributes are unstable
94+
--> $DIR/proc-macro-gates.rs:49:8
95+
|
96+
LL | #![test]
97+
| ^^^^
98+
|
99+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
100+
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
101+
= note: `#[deny(soft_unstable)]` on by default
102+

0 commit comments

Comments
 (0)