We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To reproduce (a more realistic example would use #[link_section]):
#[link_section]
#![feature(used)] #[used] static FOO: u32 = 0; fn main(){}
warning: static item is never used: `FOO` --> <anon>:3:1 | 3 | static FOO: u32 = 0; | ^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(dead_code)] on by default
The text was updated successfully, but these errors were encountered:
#[used]
Rollup merge of rust-lang#41637 - eddyb:used-not-dead, r=petrochenkov
b7a6ad4
Don't ever warn about #[used] items being dead code. Fixes rust-lang#41628 by whitelisting `#[used]` items in `rustc::middle::dead`.
43cb7c4
No branches or pull requests
To reproduce (a more realistic example would use
#[link_section]
):The text was updated successfully, but these errors were encountered: