rust/tests/ui/const-generics/issues/issue-69654-run-pass.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
201 B
Rust
Raw Normal View History

// run-pass
2020-09-09 07:43:53 +00:00
trait Bar<T> {}
impl<T> Bar<T> for [u8; 7] {}
2020-09-09 07:43:53 +00:00
struct Foo<const N: usize> {}
impl<const N: usize> Foo<N>
where
[u8; N]: Bar<[(); N]>,
{
fn foo() {}
}
fn main() {
Foo::foo();
}