about summary refs log tree commit diff
path: root/tests/ui/issues/issue-53712.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-53712.rs')
-rw-r--r--tests/ui/issues/issue-53712.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-53712.rs b/tests/ui/issues/issue-53712.rs
new file mode 100644
index 00000000000..2353904d79d
--- /dev/null
+++ b/tests/ui/issues/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]
+}