]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/parser-error-recovery/issue-89013-no-kw.rs
19e0f38d320c4e915bdd9c1c76e10881fb866aeb
[rust.git] / src / test / ui / const-generics / parser-error-recovery / issue-89013-no-kw.rs
1 trait Foo<const N: usize> {
2     fn do_x(&self) -> [u8; N];
3 }
4
5 struct Bar;
6
7 const T: usize = 42;
8
9 impl Foo<N = 3> for Bar {
10 //~^ ERROR cannot constrain an associated constant to a value
11 //~| ERROR associated type bindings are not allowed here
12     fn do_x(&self) -> [u8; 3] {
13         [0u8; 3]
14     }
15 }
16
17 fn main() {}