]> git.proxmox.com Git - rustc.git/blob - tests/ui/const-generics/generic_const_exprs/issue-69654.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / const-generics / generic_const_exprs / issue-69654.rs
1 #![feature(generic_const_exprs)]
2 #![allow(incomplete_features)]
3
4 trait Bar<T> {}
5 impl<T> Bar<T> for [u8; T] {}
6 //~^ ERROR expected value, found type parameter `T`
7
8 struct Foo<const N: usize> {}
9 impl<const N: usize> Foo<N>
10 where
11 [u8; N]: Bar<[(); N]>,
12 {
13 fn foo() {}
14 }
15
16 fn main() {
17 Foo::foo();
18 //~^ ERROR the function or associated item
19 }