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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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() {}