summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/test-inner-fn.rs
blob: d419cc6fa4553dfbf2c09f5646f3c1c8444a60d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// compile-flags: --test -D unnameable_test_items

#[test]
fn foo() {
    #[test] //~ ERROR cannot test inner items [unnameable_test_items]
    fn bar() {}
    bar();
}

mod x {
    #[test]
    fn foo() {
        #[test] //~ ERROR cannot test inner items [unnameable_test_items]
        fn bar() {}
        bar();
    }
}

fn main() {}