rust-lang / rust-lang/rust

track renamed and removed library feature gates

Open
#141,617 13 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

A-diagnostics A-stability C-feature-request E-help-wanted E-medium E-mentor F-staged_api T-compiler T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Code
#![feature(stdsimd)]

fn main() {
    unsafe { core::arch::x86_64::_xbegin(); }
}
Current output
Compiling playground v0.0.1 (/playground)
error[E0658]: use of unstable library feature `stdarch_x86_rtm`
 --> src/main.rs:4:14
  |
4 |     unsafe { core::arch::x86_64::_xbegin(); }
  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #111138 <https://github.com/rust-lang/rust/issues/111138> for more information
  = help: add `#![feature(stdarch_x86_rtm)]` to the crate attributes to enable
  = note: this compiler was built on 2025-05-25; consider upgrading it if it is out of date

error[E0635]: unknown feature `stdsimd`
 --> src/main.rs:1:12
  |
1 | #![feature(stdsimd)]
  |            ^^^^^^^

Some errors have detailed explanations: E0635, E0658.
For more information about an error, try `rustc --explain E0635`.
error: could not compile `playground` (bin "playground") due to 2 previous errors
Desired output
error[E0557]: feature has been removed
 --> src/main.rs:1:12
  |
1 | #![feature(stdsimd)]
  |            ^^^^^^^ feature has been removed
  |
  = note: removed in 1.78 (you are currently using 1.89-nightly)
  = note: this feature has been split into many smaller features; see <https://github.com/rust-lang/rust/issues/27731#issuecomment-1937538034> for an exhaustive list
Rationale and extra context

we have something like this for lang features, whose removal we explicitly track:

error[E0557]: feature has been removed
 --> src/main.rs:3:12
  |
3 | #![feature(external_doc)]
  |            ^^^^^^^^^^^^ feature has been removed
  |
  = note: use #[doc = include_str!("filename")] instead, which handles macro invocations

but there is no way to track this for libs features, which leads to unnecessarily confusing errors. it would be nice if we could help people out more here, especially since the people seeing this error are likely not the crate authors but just people who happen to be using a nightly toolchain.

Other cases

Rust Version
1.89.0-nightly

(2025-05-25 283db70ace62a0ae704a)
Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.