Skip to content

Commit

Permalink
Auto merge of #116274 - RalfJung:soft_unstable, r=cjgillot
Browse files Browse the repository at this point in the history
make soft_unstable show up in future breakage reports

If we want to break these in the future, let's warn users of affected crates.
  • Loading branch information
bors committed Dec 25, 2023
2 parents 71696e5 + b9acee2 commit f8fe517
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,7 @@ declare_lint! {
Deny,
"a feature gate that doesn't break dependent crates",
@future_incompatible = FutureIncompatibleInfo {
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
reference: "issue #64266 <https://github.com/rust-lang/rust/issues/64266>",
};
}
Expand Down
22 changes: 22 additions & 0 deletions tests/ui/feature-gates/bench.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,25 @@ LL | use bench as _;

error: aborting due to 2 previous errors

Future incompatibility report: Future breakage diagnostic:
error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable
--> $DIR/bench.rs:3:3
|
LL | #[bench]
| ^^^^^
|
= 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 #64266 <https://github.com/rust-lang/rust/issues/64266>
= note: `#[deny(soft_unstable)]` on by default

Future breakage diagnostic:
error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable
--> $DIR/bench.rs:7:5
|
LL | use bench as _;
| ^^^^^
|
= 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 #64266 <https://github.com/rust-lang/rust/issues/64266>
= note: `#[deny(soft_unstable)]` on by default

15 changes: 15 additions & 0 deletions tests/ui/lint/expansion-time.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,18 @@ LL | #[warn(incomplete_include)]

warning: 4 warnings emitted

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

11 changes: 11 additions & 0 deletions tests/ui/proc-macro/inner-attr-non-inline-mod.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ LL | #![rustfmt::skip]
error: aborting due to 4 previous errors

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

11 changes: 11 additions & 0 deletions tests/ui/proc-macro/proc-macro-gates.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,14 @@ LL | #![test]
error: aborting due to 10 previous errors

For more information about this error, try `rustc --explain E0658`.
Future incompatibility report: Future breakage diagnostic:
error: inner macro attributes are unstable
--> $DIR/proc-macro-gates.rs:49:8
|
LL | #![test]
| ^^^^
|
= 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 #64266 <https://github.com/rust-lang/rust/issues/64266>
= note: `#[deny(soft_unstable)]` on by default

0 comments on commit f8fe517

Please sign in to comment.