Debian Codegraph @

gcc/testsuite/rust/compile/non_member_const.rs

raw
1 // https://doc.rust-lang.org/error_codes/E0323.html
2 #![allow(unused)]
3 fn main() {
4 trait Foo {
5 type N;
6 }
7
8 struct Bar;
9
10 impl Foo for Bar {// { dg-error "missing N in implementation of trait .Foo." }
11 const N : u32 = 0; // { dg-error "item .N. is an associated const, which does not match its trait .Foo." }
12 }
13 }