add tests

This commit is contained in:
b-naber 2021-10-25 16:04:23 +02:00
parent c6b69017e2
commit 0199a81304
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,9 @@
// build-pass
#![feature(generic_const_exprs)]
#![allow(unused_braces, incomplete_features)]
pub trait Foo<const N: usize> {}
pub trait Bar: Foo<{ 1 }> { }
fn main() {}

View file

@ -0,0 +1,16 @@
// build-pass
#![feature(generic_const_exprs)]
#![allow(unused_braces, incomplete_features)]
pub trait AnotherTrait{
const ARRAY_SIZE: usize;
}
pub trait Shard<T: AnotherTrait>:
AsMut<[[u8; T::ARRAY_SIZE]]>
where
[(); T::ARRAY_SIZE]: Sized
{
}
fn main() {}