summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-consts/associated-const-dead-code.rs
blob: f7b676418ff3656ad046bc806a27ca57ec901da7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![deny(dead_code)]

struct MyFoo;

impl MyFoo {
    const BAR: u32 = 1;
    //~^ ERROR associated constant `BAR` is never used
}

fn main() {
    let _: MyFoo = MyFoo;
}