Skip to content

#[unstable] accepts an already-stable language feature #129814

Closed
@RalfJung

Description

@RalfJung

This should probably not be accepted:

#![feature(staged_api)]
#![stable(feature = "rust_test", since = "1.0.0")]

#[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
#[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
const fn my_fun() {}

fn main() {}

arbitrary_enum_discriminant is already stable, so having an unstable function under this feature makes no sense.

Metadata

Metadata

Assignees

Labels

A-stabilityArea: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions