about summary refs log tree commit diff
path: root/tests/ui/unique/unique-rec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unique/unique-rec.rs')
-rw-r--r--tests/ui/unique/unique-rec.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/unique/unique-rec.rs b/tests/ui/unique/unique-rec.rs
new file mode 100644
index 00000000000..9f8ad9bb050
--- /dev/null
+++ b/tests/ui/unique/unique-rec.rs
@@ -0,0 +1,9 @@
+// run-pass
+
+struct X { x: isize }
+
+pub fn main() {
+    let x: Box<_> = Box::new(X {x: 1});
+    let bar = x;
+    assert_eq!(bar.x, 1);
+}