summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-consts/associated-const-impl-wrong-type.rs
blob: 1aad749c1ebe29f42cf4d91a4b53e75f9abe058b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
trait Foo {
    const BAR: u32;
}

struct SignedBar;

impl Foo for SignedBar {
    const BAR: i32 = -1;
    //~^ ERROR implemented const `BAR` has an incompatible type for trait [E0326]
}

fn main() {}