Closed
Description
Given the following code:
#![feature(discriminant_value)]
fn main() {
let y = Some(1);
println!("{:?}", std::mem::discriminant(&y));
}
The current output is:
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/main.rs:1:1
|
1 | #![feature(discriminant_value)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ideally the output should look like:
error: ...
help: the feature `discriminant_value` has been stable since 1.21.0 and no longer requires an attribute to enable
(or it could be downgraded from error to warning)
#83722 fixed this for #![feature(min_const_generics)]
but not for #![feature(discriminant_value)]
, somehow
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: `#[stable]`, `#[unstable]` etc.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.