-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Unstable features accidentally usable on the Stable release chanel are still unstable #2405
Conversation
CC @rust-lang/libs |
assigning to core team because its about project-wide policy |
Kicking off core team review: @rfcbot fcp merge |
Team member @aturon has proposed to merge this. The next step is review by the rest of the tagged teams:
No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
@@ -22,6 +22,10 @@ The RFC covers only API issues; other issues related to language features, | |||
lints, type inference, command line arguments, Cargo, and so on are considered | |||
out of scope. | |||
|
|||
The stability promise specifically does *not* apply to unstable features, | |||
even if they are accidentally usable on the Stable release channel | |||
under certain conditions such as because of bugs in the compiler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm; Maybe say 1-2 words about who decides this? (I assume the responsible team does?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is intended to be the decision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is: if we in the future find new "bugs" wrt. unstable; who decides if it was really a bug, or working as intended? I guess the criteria for bug could be / is that something became stable without going through a stabilization FCP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the standard library at least I think there’s no ambiguity since every public item is required to have either #[stable]
or #[unstable]
. Though you’re right that it’s may not that clear cut for language features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small note re. standard library: trait impls are insta-stable regardless of #[unstable]
afaik and macros do not respect stability attributes either.
@@ -22,6 +22,10 @@ The RFC covers only API issues; other issues related to language features, | |||
lints, type inference, command line arguments, Cargo, and so on are considered | |||
out of scope. | |||
|
|||
The stability promise specifically does *not* apply to unstable features, | |||
even if they are accidentally usable on the Stable release channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove the accidentally wording here? Things like the bootstrap environment variable aren't accidental, but we still don't consider them stable.
Ping @rust-lang/core, @SimonSapin Any progress here? |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. |
In some cases, it is possible to use unstable features on the Stable release channel. For example:
foo::bar::baz
path is checked for stability: Track stability of path components rust#15702. (See for example Add inherent methods in libcore for [T], [u8], str, f32, and f64 rust#49896 (comment).)test
or with some other name of a standard library crate, is it possible to override what is called by some compiler-generated code. Things break when the signature of those calls later change: Regression in 1.26: cannot find functionassert_test_result
in moduleself::test
rust#49942This PR proposes that the semantic versioning / stability promise normally associated to the Stable release channel specifically do not extend to such cases. Finding a way to bypass the stability system should not be sufficient to make unstable features de-facto stable.