rust/tests/ui/const-generics/generic_const_exprs/issue-69654.rs

20 lines
353 B
Rust
Raw Normal View History

#![feature(generic_const_exprs)]
2020-09-09 02:43:53 -05:00
#![allow(incomplete_features)]
trait Bar<T> {}
impl<T> Bar<T> for [u8; T] {}
//~^ ERROR expected value, found type parameter `T`
struct Foo<const N: usize> {}
impl<const N: usize> Foo<N>
where
[u8; N]: Bar<[(); N]>,
{
fn foo() {}
}
fn main() {
Foo::foo();
2021-03-15 17:10:24 -05:00
//~^ ERROR the function or associated item
2020-09-09 02:43:53 -05:00
}