summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/partial_qualif.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/partial_qualif.rs')
-rw-r--r--tests/ui/consts/partial_qualif.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/consts/partial_qualif.rs b/tests/ui/consts/partial_qualif.rs
new file mode 100644
index 000000000..7c28b8b8a
--- /dev/null
+++ b/tests/ui/consts/partial_qualif.rs
@@ -0,0 +1,9 @@
+use std::cell::Cell;
+
+const FOO: &(Cell<usize>, bool) = {
+ let mut a = (Cell::new(0), false);
+ a.1 = true; // sets `qualif(a)` to `qualif(a) | qualif(true)`
+ &{a} //~ ERROR cannot refer to interior mutable
+};
+
+fn main() {}