summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/borrowck-fixed-length-vecs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/borrowck/borrowck-fixed-length-vecs.rs')
-rw-r--r--src/test/ui/borrowck/borrowck-fixed-length-vecs.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/borrowck/borrowck-fixed-length-vecs.rs b/src/test/ui/borrowck/borrowck-fixed-length-vecs.rs
new file mode 100644
index 000000000..126323d8d
--- /dev/null
+++ b/src/test/ui/borrowck/borrowck-fixed-length-vecs.rs
@@ -0,0 +1,7 @@
+// run-pass
+
+pub fn main() {
+ let x = [22];
+ let y = &x[0];
+ assert_eq!(*y, 22);
+}