From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/box/unit/unique-decl-init.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/ui/box/unit/unique-decl-init.rs (limited to 'tests/ui/box/unit/unique-decl-init.rs') diff --git a/tests/ui/box/unit/unique-decl-init.rs b/tests/ui/box/unit/unique-decl-init.rs new file mode 100644 index 000000000..1d70860c7 --- /dev/null +++ b/tests/ui/box/unit/unique-decl-init.rs @@ -0,0 +1,7 @@ +// run-pass + +pub fn main() { + let i: Box<_> = Box::new(1); + let j = i; + assert_eq!(*j, 1); +} -- cgit v1.2.3