rust/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs

19 lines
411 B
Rust
Raw Normal View History

2021-08-18 04:05:59 -05:00
// --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
2021-08-18 04:05:59 -05:00
// check-pass
mod one {
#![allow(dead_code)]
fn dead_function() {}
//~^ WARN function `dead_function` is never used
2021-08-18 04:05:59 -05:00
}
mod two {
fn dead_function() {}
//~^ WARN function `dead_function` is never used
2021-08-18 04:05:59 -05:00
}
fn main() {}