mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
19 lines
411 B
Rust
19 lines
411 B
Rust
// --force-warn $LINT causes $LINT (which is warn-by-default) to warn
|
|
// despite being allowed in one submodule (but not the other)
|
|
// compile-flags: --force-warn dead_code
|
|
// check-pass
|
|
|
|
mod one {
|
|
#![allow(dead_code)]
|
|
|
|
fn dead_function() {}
|
|
//~^ WARN function `dead_function` is never used
|
|
}
|
|
|
|
mod two {
|
|
fn dead_function() {}
|
|
//~^ WARN function `dead_function` is never used
|
|
}
|
|
|
|
fn main() {}
|