Incorrect 'unused extern crate warning' with extern crate alloc
#83888
Labels
A-edition-2018
Area: The 2018 edition
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: No warning, because removing the extern crate gives an error:
Instead, this happened:
I think either the lint shouldn't fire or the compiler should somehow know the available feature gates ahead of time.
Meta
rustc --version --verbose
:cc rust-lang/stdarch#1108
The text was updated successfully, but these errors were encountered: