]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/parser-error-recovery/issue-89013.rs
Auto merge of #105924 - TimNN:ui-remap, r=Mark-Simulacrum
[rust.git] / tests / ui / const-generics / parser-error-recovery / issue-89013.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 = const 3> for Bar {
10 //~^ ERROR expected lifetime, type, or constant, found keyword `const`
11 //~| ERROR this trait takes 1 generic
12 //~| ERROR associated type bindings are not allowed here
13 //~| ERROR associated const equality is incomplete
14     fn do_x(&self) -> [u8; 3] {
15         [0u8; 3]
16     }
17 }
18
19 fn main() {}