summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/early/invalid-const-arguments.rs
blob: 6619c97588596d5907b0cb276c8c01f1b25162a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![crate_type="lib"]

struct A<const N: u8>;
trait Foo {}
impl Foo for A<N> {}
//~^ ERROR cannot find type
//~| unresolved item provided when a constant

struct B<const N: u8>;
impl<N> Foo for B<N> {}
//~^ ERROR type provided when a constant

struct C<const C: u8, const N: u8>;
impl<const N: u8> Foo for C<N, T> {}
//~^ ERROR cannot find type
//~| unresolved item provided when a constant