aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/non_member_const.rs
blob: 5812db29e03869dcbeadb14ab314bdd289ae94cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// https://doc.rust-lang.org/error_codes/E0323.html
#![allow(unused)]
fn main() {
trait Foo {
    type N;
}

struct Bar;

impl Foo for Bar {// { dg-error "missing N in implementation of trait .Foo." }
    const N : u32 = 0; // { dg-error "item .N. is an associated const, which does not match its trait .Foo." }
}
}