-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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]
accepts an already-stable language feature
#129814
Labels
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Aug 31, 2024
jieyouxu
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
labels
Aug 31, 2024
@rustbot claim |
Should we also reject features that don't exist? Right now, this test would fail (because it would compile without problems) //@ check-fail
#![feature(staged_api)]
#![stable(feature = "rust_test", since = "1.0.0")]
#[unstable(feature = "name_of_a_feature_that_does_not_exist", issue = "42")]
const fn my_fun() {}
fn main() {} |
"unstable" attributes is how library features come into existence. So yes we should accept features that do not yet exist.
|
jieyouxu
added
A-stability
Area: `#[stable]`, `#[unstable]` etc.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Oct 10, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 12, 2024
…ccepted-features, r=jieyouxu Emit an error for unstable attributes that reference already stable features Closes rust-lang#129814
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 12, 2024
…ccepted-features, r=jieyouxu Emit an error for unstable attributes that reference already stable features Closes rust-lang#129814
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 13, 2024
Rollup merge of rust-lang#131567 - CastilloDel:reject-unstable-with-accepted-features, r=jieyouxu Emit an error for unstable attributes that reference already stable features Closes rust-lang#129814
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This should probably not be accepted:
arbitrary_enum_discriminant
is already stable, so having an unstable function under this feature makes no sense.The text was updated successfully, but these errors were encountered: