summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/issue-53712.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/typeck/issue-53712.rs')
-rw-r--r--tests/ui/typeck/issue-53712.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/typeck/issue-53712.rs b/tests/ui/typeck/issue-53712.rs
new file mode 100644
index 000000000..2353904d7
--- /dev/null
+++ b/tests/ui/typeck/issue-53712.rs
@@ -0,0 +1,9 @@
+// issue #53712: make the error generated by using tuple indexing on an array more specific
+
+fn main() {
+ let arr = [10, 20, 30, 40, 50];
+ arr.0;
+ //~^ ERROR no field `0` on type `[{integer}; 5]` [E0609]
+ //~| HELP instead of using tuple indexing, use array indexing
+ //~| SUGGESTION arr[0]
+}