summaryrefslogtreecommitdiffstats
path: root/src/test/ui/deref-rc.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/deref-rc.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/deref-rc.rs b/src/test/ui/deref-rc.rs
new file mode 100644
index 000000000..9b4c63b19
--- /dev/null
+++ b/src/test/ui/deref-rc.rs
@@ -0,0 +1,8 @@
+// run-pass
+
+use std::rc::Rc;
+
+fn main() {
+ let x = Rc::new([1, 2, 3, 4]);
+ assert_eq!(*x, [1, 2, 3, 4]);
+}