add tests
This commit is contained in:
parent
c6b69017e2
commit
0199a81304
2 changed files with 25 additions and 0 deletions
|
@ -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() {}
|
16
src/test/ui/const-generics/issues/issue-89334.rs
Normal file
16
src/test/ui/const-generics/issues/issue-89334.rs
Normal 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() {}
|
Loading…
Reference in a new issue