]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/diagnostics.rs
Add tests for `#[no_mangle]` in `impl` blocks that looks like generic `impl` blocks...
[rust.git] / src / test / ui / const-generics / diagnostics.rs
1 #![crate_type="lib"]
2 #![feature(min_const_generics)]
3 #![allow(incomplete_features)]
4
5 struct A<const N: u8>;
6 trait Foo {}
7 impl Foo for A<N> {}
8 //~^ ERROR cannot find type
9 //~| unresolved item provided when a constant
10
11 struct B<const N: u8>;
12 impl<N> Foo for B<N> {}
13 //~^ ERROR type provided when a constant
14
15 struct C<const C: u8, const N: u8>;
16 impl<const N: u8> Foo for C<N, T> {}
17 //~^ ERROR cannot find type
18 //~| unresolved item provided when a constant