about summary refs log tree commit diff
path: root/tests/ui/lint/force-warn/warn-by-default-lint-two-modules.rs
blob: 7da0960068f221d4606b4d91296fd000a9c466a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// --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() {}