about summary refs log tree commit diff
path: root/tests/ui/lint/dead-code/trait-impl.rs
blob: ba0365b194fe614b348f518af24a4032e67822b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ check-pass
#![deny(dead_code)]

enum Foo {
    Bar,
}

fn main() {
    let p = [0; 0];
    p.bar();
}

trait Bar {
    fn bar(&self) -> usize {
        3
    }
}

impl Bar for [u32; Foo::Bar as usize] {}