summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/generic_const_exprs/issue-69654.rs
blob: 9b36699bbf112e95f5bd969dfcab6228ee95d916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(generic_const_exprs)]
#![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();
    //~^ ERROR the function or associated item
}