-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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
Why doesn't compiler error message say what feature should I enable? It tells me about the lint |
This has been shown in future breakage reports for almost a year now (since #116274). I think we should move on towards making this lint a hard error. IMO if we want to de-stabilize something in the future, we should just have a new lint for each such case. I don't think it is a good idea to have one lint used as a grab-bag for a bunch of independent things; each de-stabilization needs to be handled on its own timeline anyway and might need its own guidance for how to adjust the code to make it still work. @kryptan please file an issue with a piece of example code triggering a sub-par diagnostic, and what information you think is missing from the diagnostic. |
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.
Features that are currently emitting this lint
The
#[bench]
attributeTracking issue: #50297
RustcEncodable & RustcDecodable
Tracking issue: #134301
RustcEncodable
&RustcDecodable
, remove from prelude in next edition #116016Features that were previously emitting this lint
Inner
#![test]
and#![rustfmt::skip]
Tracking issue: #54726
#![test]
attributes as soft-unstable #79003Before adding new features here, read this
We should really support a separate tracking issue for each case of a soft-unstable feature; having them all point here doesn't make a ton of sense.
The text was updated successfully, but these errors were encountered: