summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const_let_assign.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/consts/const_let_assign.rs')
-rw-r--r--src/test/ui/consts/const_let_assign.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/consts/const_let_assign.rs b/src/test/ui/consts/const_let_assign.rs
new file mode 100644
index 000000000..b83acfb73
--- /dev/null
+++ b/src/test/ui/consts/const_let_assign.rs
@@ -0,0 +1,10 @@
+// check-pass
+
+struct S(i32);
+
+const A: () = {
+ let mut s = S(0);
+ s.0 = 1;
+};
+
+fn main() {}