]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/issue-69654.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.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 }