diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-26 16:01:38 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-06-26 16:01:45 +0000 |
| commit | 86c8eae7745b47ada8305dcdac16b7f2dbdd68c9 (patch) | |
| tree | 5106049c25a1627cd237af19ac12f6fe479577de /tests/ui/const-generics/suggest_const_for_array.rs | |
| parent | 5988078aa20bf642bc1bbab15a45ac5cb74e77e2 (diff) | |
| download | rust-86c8eae7745b47ada8305dcdac16b7f2dbdd68c9.tar.gz rust-86c8eae7745b47ada8305dcdac16b7f2dbdd68c9.zip | |
Automatically taint InferCtxt when errors are emitted
Diffstat (limited to 'tests/ui/const-generics/suggest_const_for_array.rs')
| -rw-r--r-- | tests/ui/const-generics/suggest_const_for_array.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/ui/const-generics/suggest_const_for_array.rs b/tests/ui/const-generics/suggest_const_for_array.rs index f3e5a3186cd..4d29d069375 100644 --- a/tests/ui/const-generics/suggest_const_for_array.rs +++ b/tests/ui/const-generics/suggest_const_for_array.rs @@ -3,8 +3,10 @@ fn example<const N: usize>() {} fn other() { - example::<[usize; 3]>(); - //~^ ERROR type provided when a const - example::<[usize; 4+5]>(); - //~^ ERROR type provided when a const + example::<[usize; 3]>(); + //~^ ERROR type provided when a const + //~| ERROR type annotations needed + example::<[usize; 4 + 5]>(); + //~^ ERROR type provided when a const + //~| ERROR type annotations needed } |
