diff options
| author | Boxy <supbscripter@gmail.com> | 2023-05-02 18:04:52 +0100 |
|---|---|---|
| committer | Boxy <supbscripter@gmail.com> | 2023-05-04 11:22:40 +0100 |
| commit | c04106f9f13cb6e8f73aff8ea0888e94631dc47a (patch) | |
| tree | ac257300aa7b7dd2b51df6684aa9e8fd01f85c60 /tests/ui/const-generics/sneaky-array-repeat-expr.rs | |
| parent | 6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c (diff) | |
| download | rust-c04106f9f13cb6e8f73aff8ea0888e94631dc47a.tar.gz rust-c04106f9f13cb6e8f73aff8ea0888e94631dc47a.zip | |
check array type of repeat exprs is wf
Diffstat (limited to 'tests/ui/const-generics/sneaky-array-repeat-expr.rs')
| -rw-r--r-- | tests/ui/const-generics/sneaky-array-repeat-expr.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/ui/const-generics/sneaky-array-repeat-expr.rs b/tests/ui/const-generics/sneaky-array-repeat-expr.rs index b147c246bda..cd1607608a6 100644 --- a/tests/ui/const-generics/sneaky-array-repeat-expr.rs +++ b/tests/ui/const-generics/sneaky-array-repeat-expr.rs @@ -10,6 +10,7 @@ impl<const N: usize> Trait<N> for () { pub const fn foo<const N: usize>() where (): Trait<N> { let bar = [(); <()>::Assoc]; //~^ error: constant expression depends on a generic parameter + //~| error: constant expression depends on a generic parameter } trait Trait2<const N: usize> { @@ -24,6 +25,7 @@ impl<const N: usize> Trait2<N> for () { pub const fn foo2<const N: usize>() where (): Trait2<N> { let bar2 = [(); <()>::Assoc2]; //~^ error: constant expression depends on a generic parameter + //~| error: constant expression depends on a generic parameter } fn main() { |
