blob: 7e775999ebd10f85e721a9eb8eaf599d38c993d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#![feature(const_generics)]
#![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();
}
|