diff options
| author | b-naber <bn263@gmx.de> | 2021-10-25 16:04:23 +0200 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2021-10-25 16:05:03 +0200 |
| commit | 0199a81304fe7cf07f0d2c718a4243f47c1620ea (patch) | |
| tree | 78926160aa79ecd7de9fdad65f106c87f17332f7 | |
| parent | c6b69017e21610b1ef491c028697728fbd3f581a (diff) | |
| download | rust-0199a81304fe7cf07f0d2c718a4243f47c1620ea.tar.gz rust-0199a81304fe7cf07f0d2c718a4243f47c1620ea.zip | |
add tests
| -rw-r--r-- | src/test/ui/const-generics/expose-default-substs-param-env.rs | 9 | ||||
| -rw-r--r-- | src/test/ui/const-generics/issues/issue-89334.rs | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/expose-default-substs-param-env.rs b/src/test/ui/const-generics/expose-default-substs-param-env.rs new file mode 100644 index 00000000000..e40c93116af --- /dev/null +++ b/src/test/ui/const-generics/expose-default-substs-param-env.rs @@ -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() {} diff --git a/src/test/ui/const-generics/issues/issue-89334.rs b/src/test/ui/const-generics/issues/issue-89334.rs new file mode 100644 index 00000000000..b15b7428cdd --- /dev/null +++ b/src/test/ui/const-generics/issues/issue-89334.rs @@ -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() {} |
