-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Tracking issue for future-incompatibility lint soft_unstable
#64266
Comments
do we need an issue for this ? |
feature_gate: Remove `GateStrength` The "soft feature gating" from `feature_gate/check.rs` is unused, and even if it were used, hardcoded warning is not a good solution and [deny-by-default lint](rust-lang#64266) would be a better way to do this. cc rust-lang#67806 (comment) r? @Centril
feature_gate: Remove `GateStrength` The "soft feature gating" from `feature_gate/check.rs` is unused, and even if it were used, hardcoded warning is not a good solution and [deny-by-default lint](rust-lang#64266) would be a better way to do this. cc rust-lang#67806 (comment) r? @Centril
The generated Rust code from our proto files triggers a warning in Rust nightly, which we treat as an error: error: custom inner attributes are unstable Error: --> src/../proto/metadata.rs:9:4 | 9 | #![rustfmt::skip] | ^^^^^^^^^^^^^ | = note: `#[deny(soft_unstable)]` on by default = 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 <rust-lang/rust#64266> This is already reported in the `rust-protobuf` repo [1] so until it's fixed, we choose to silence this warning to make our builds work. [1]: stepancheg/rust-protobuf#551
The generated Rust code from our proto files triggers a warning in Rust nightly, which we treat as an error: error: custom inner attributes are unstable Error: --> src/../proto/metadata.rs:9:4 | 9 | #![rustfmt::skip] | ^^^^^^^^^^^^^ | = note: `#[deny(soft_unstable)]` on by default = 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 <rust-lang/rust#64266> This is already reported in the `rust-protobuf` repo [1] so until it's fixed, we choose to silence this warning to make our builds work. [1]: stepancheg/rust-protobuf#551
The CI nightly builds had been broken with the following error: ``` error: custom inner attributes are unstable --> /home/runner/work/moonfire-nvr/moonfire-nvr/server/target/debug/build/moonfire-db-415ce696a754c614/out/schema.rs:10:4 | 10 | #![rustfmt::skip] | ^^^^^^^^^^^^^ | = note: `#[deny(soft_unstable)]` on by default = 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 <rust-lang/rust#64266> ``` I'd thought this was by mistake given that #[rustfmt::skip] is still advertised on rustfmt's github page, but maybe not. Looks like rust-protobuf's newest version uses `#![cfg_attr(rustfmt, rustfmt::skip)]` to avoid this error. Also fix a warning on nightly about an extraneous semicolon.
So this feature is used to make breaking change to avoid breaking change ? The concept of
|
I think I might need to use this for #95956 as well |
See: rust-lang/rust#64266 Signed-off-by: Christina Sørensen <christina@cafkafk.com>
See: rust-lang/rust#64266 Signed-off-by: Christina Sørensen <christina@cafkafk.com>
soft_unstable
compatibility lintsoft_unstable
What is this lint about
When some feature is unstable, but was allowed on stable due to some stability checking hole or oversight we may unstabilize it in a "soft" way to avoid breaking crates depending on the crates using the feature.
This soft unstabilization can be done using this lint.
How to fix this warning/error
Remove or
cfg
-out uses of the unstable feature in configurations of your code that are supposed to build on stable.Current status
soft_unstable
for the attribute#[bench]
(feature(test)
).#![test]
attributes as soft-unstable #79003 usessoft_unstable
for inner#![test]
(feature(custom_inner_attributes)
).soft_unstable
for inner#![rustfmt::skip]
on out-of-line modules (feature(custom_inner_attributes)
).The text was updated successfully, but these errors were encountered: