Debian Codegraph @

gcc/testsuite/rust/compile/const_generics_7.rs

raw
1 struct S<const N: usize>;
2
3 pub fn foo<const N: FooBar>() {} // { dg-error "could not resolve" }
4 type Foo<const N: FooBar> = S<N>; // { dg-error "could not resolve" }
5 struct Foo2<const N: FooBar>; // { dg-error "could not resolve" }
6 enum Foo3<const N: FooBar> { // { dg-error "could not resolve" }
7 Foo,
8 Bar,
9 }
10 union Foo4<const N: FooBar> { // { dg-error "could not resolve" }
11 a: usize,
12 b: i32,
13 }
14 trait Fooable<const N: FooBar> {} // { dg-error "could not resolve" }
15
16 trait Traitable {}
17 impl<const N: FooBar> Traitable for Foo2<N> {} // { dg-error "could not resolve" }