summary refs log tree commit diff
path: root/src/test/ui/lint/dead-code/lint-dead-code-6.rs
blob: 0a543d5c6228d1e0eef70e2667374649ae009ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![deny(dead_code)]

struct UnusedStruct; //~ ERROR struct is never constructed: `UnusedStruct`
impl UnusedStruct {
    fn unused_impl_fn_1() { //~ ERROR associated function is never used: `unused_impl_fn_1`
        println!("blah");
    }

    fn unused_impl_fn_2(var: i32) { //~ ERROR associated function is never used: `unused_impl_fn_2`
        println!("foo {}", var);
    }

    fn unused_impl_fn_3( //~ ERROR associated function is never used: `unused_impl_fn_3`
        var: i32,
    ) {
        println!("bar {}", var);
    }
}

fn main() {}