summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-51116.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-51116.rs')
-rw-r--r--tests/ui/issues/issue-51116.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-51116.rs b/tests/ui/issues/issue-51116.rs
new file mode 100644
index 000000000..4c21cbfc6
--- /dev/null
+++ b/tests/ui/issues/issue-51116.rs
@@ -0,0 +1,12 @@
+fn main() {
+ let tiles = Default::default();
+ for row in &mut tiles {
+ for tile in row {
+ *tile = 0;
+ //~^ ERROR type annotations needed
+ //~| NOTE cannot infer type
+ }
+ }
+
+ let tiles: [[usize; 3]; 3] = tiles;
+}