summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/dead-code/lint-dead-code-6.rs
blob: 5b2b76b76ecd4ef78406f538c1ff05bb34a21d79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![deny(dead_code)]

struct UnusedStruct; //~ ERROR struct `UnusedStruct` is never constructed
impl UnusedStruct {
    fn unused_impl_fn_1() {
        //~^ ERROR associated functions `unused_impl_fn_1`, `unused_impl_fn_2`, and `unused_impl_fn_3` are never used [dead_code]
        println!("blah");
    }

    fn unused_impl_fn_2(var: i32) {
        println!("foo {}", var);
    }

    fn unused_impl_fn_3(var: i32) {
        println!("bar {}", var);
    }
}

fn main() {}