summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cancel-clean-via-immediate-rvalue-ref.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/cancel-clean-via-immediate-rvalue-ref.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/cancel-clean-via-immediate-rvalue-ref.rs b/src/test/ui/cancel-clean-via-immediate-rvalue-ref.rs
new file mode 100644
index 000000000..a0a561ab2
--- /dev/null
+++ b/src/test/ui/cancel-clean-via-immediate-rvalue-ref.rs
@@ -0,0 +1,10 @@
+// run-pass
+// pretty-expanded FIXME #23616
+
+fn foo(x: &mut Box<u8>) {
+ *x = Box::new(5);
+}
+
+pub fn main() {
+ foo(&mut Box::new(4));
+}