Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
b-naber committed Oct 25, 2021
1 parent c6b6901 commit 0199a81
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/const-generics/expose-default-substs-param-env.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 16 additions & 0 deletions src/test/ui/const-generics/issues/issue-89334.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 0199a81

Please sign in to comment.