Skip to content

Tracking issue for future-incompatibility lint soft_unstable #64266

Closed

Description

@petrochenkov

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

(none)

Features that were previously emitting this lint

The #[bench] attribute

Tracking issue: #50297

RustcEncodable & RustcDecodable

Tracking issue: #134301

Inner #![test] and #![rustfmt::skip]

Tracking issue: #54726

Before 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.

Activity

  1. added
    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Sep 7, 2019
  2. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    T-langRelevant to the language team
    and removed
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Sep 7, 2019
  3. lqd commented on Oct 4, 2019

    @lqd
    Member

    #[deny(soft_unstable)] is on by default, but the error message (playground) still has a lint-like note warning mentioning it will become a hard error in the future:

    = 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>
    

    do we need an issue for this ?

  4. added 2 commits that reference this issue on Jan 11, 2020
  5. Stargateur commented on Aug 31, 2021

    @Stargateur
    Contributor

    So this feature is used to make breaking change to avoid breaking change ? The concept of solf_unstable don't make any sense for me, specially if #[deny(soft_unstable)] is default. It's just a more complicate way that produce the same result. Or I'm missing something.

    #[stability(level=2.33333333, wind-strenght=5.3)] (not from me, author probably wishes to stay in shadow)

  6. yaahc commented on May 16, 2022

    @yaahc
    Member

    I think I might need to use this for #95956 as well

  7. 5 remaining items

  8. kryptan commented on Nov 19, 2024

    @kryptan
    Contributor

    Why doesn't compiler error message say what feature should I enable? It tells me about the lint soft_unstable but not about feature(custom_inner_attributes). Error messages for unstable features typically tell you the name of the feature.

  9. RalfJung commented on Dec 11, 2024

    @RalfJung
    Member

    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.

  10. added 4 commits that reference this issue on Feb 25, 2026
  11. added a commit that references this issue on Feb 26, 2026
  12. added a commit that references this issue on Feb 26, 2026
  13. added 2 commits that reference this issue on Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-future-incompatibilityCategory: Future-incompatibility lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions