summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/traits13.rs
blob: 326f03907567fcb83062879ed1d8a210b7de4773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
trait Trait {
    const FOO: usize;
    type Target;
}

struct S;
// { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }

impl Trait for S {
    const FOO: usize = 0;
    type Target = usize;
}

fn main() {
    let a: <S as Trait>::Target;
    a = <S as Trait>::FOO;
}