allow(dead_code) does not work for static externs · Issue #38780 · rust-lang/rust
The following Rust code: extern "C" { #[allow(dead_code)] static Qt: u64; } fn main() { println!("hello world"); } produces the warning: warning: foreign static item is never used: `Qt`, #[warn(dea...