From 0df193f39e3c38422452d689fd2e0ef6ce53c1eb Mon Sep 17 00:00:00 2001 From: varkor Date: Mon, 25 Feb 2019 23:57:08 +0000 Subject: [PATCH] Add a test for #27054 --- src/test/ui/primitive-binop-lhs-mut.rs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/test/ui/primitive-binop-lhs-mut.rs diff --git a/src/test/ui/primitive-binop-lhs-mut.rs b/src/test/ui/primitive-binop-lhs-mut.rs new file mode 100644 index 0000000000000..4f1c456ace354 --- /dev/null +++ b/src/test/ui/primitive-binop-lhs-mut.rs @@ -0,0 +1,6 @@ +// run-pass + +fn main() { + let x = Box::new(0); + assert_eq!(0, *x + { drop(x); let _ = Box::new(main); 0 }); +}