about summary refs log tree commit diff
path: root/tests/ui/const-generics/suggest_const_for_array.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-26 16:01:38 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-26 16:01:45 +0000
commit86c8eae7745b47ada8305dcdac16b7f2dbdd68c9 (patch)
tree5106049c25a1627cd237af19ac12f6fe479577de /tests/ui/const-generics/suggest_const_for_array.rs
parent5988078aa20bf642bc1bbab15a45ac5cb74e77e2 (diff)
downloadrust-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.rs10
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
 }