Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make soft_unstable show up in future breakage reports #116274

Merged
merged 1 commit into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2457,7 +2457,7 @@ declare_lint! {
Deny,
"a feature gate that doesn't break dependent crates",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the docs be updated as well?

Copy link
Member Author

@RalfJung RalfJung Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? This still doesn't break dependent crates.

Though I do admit I find this description a bit confusing. It's not a feature gate, not really? But the text also doesn't seem to show up in the output, so... 🤷

@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

Loading