summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-27842.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-27842.rs')
-rw-r--r--tests/ui/issues/issue-27842.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-27842.rs b/tests/ui/issues/issue-27842.rs
index 3bcfa1330..060d3b34e 100644
--- a/tests/ui/issues/issue-27842.rs
+++ b/tests/ui/issues/issue-27842.rs
@@ -8,4 +8,9 @@ fn main() {
let i = 0_usize;
let _ = tup[i];
//~^ ERROR cannot index into a value of type
+
+ // the case where the index is out of bounds
+ let tup = (10,);
+ let _ = tup[3];
+ //~^ ERROR cannot index into a value of type
}