Files
rust/src/test/ui/const-generics/issues/issue-69654-run-pass.rs

19 lines
313 B
Rust
Raw Normal View History

2020-09-09 09:43:53 +02:00
#![feature(const_generics)]
#![allow(incomplete_features, unused_braces)]
trait Bar<T> {}
impl<T> Bar<T> for [u8; {7}] {}
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 23:10:24 +01:00
//~^ ERROR the function or associated item
2020-09-09 09:43:53 +02:00
}