diff options
Diffstat (limited to 'tests/ui/cancel-clean-via-immediate-rvalue-ref.rs')
-rw-r--r-- | tests/ui/cancel-clean-via-immediate-rvalue-ref.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs b/tests/ui/cancel-clean-via-immediate-rvalue-ref.rs new file mode 100644 index 000000000..a0a561ab2 --- /dev/null +++ b/tests/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)); +} |