about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-06-14 16:27:44 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-06-19 11:52:39 -0700
commit6c056fba4db7bd85a5fb3610bec6c00a7ad64f81 (patch)
tree0ffa1557009f93314afad0d91924012ea5c61e34 /src
parent2a128fa205f36074c8fbf4bc490e1ad0f76f38f6 (diff)
downloadrust-6c056fba4db7bd85a5fb3610bec6c00a7ad64f81.tar.gz
rust-6c056fba4db7bd85a5fb3610bec6c00a7ad64f81.zip
random forgotten test case
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/borrowck-fixed-length-vecs.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/run-pass/borrowck-fixed-length-vecs.rs b/src/test/run-pass/borrowck-fixed-length-vecs.rs
new file mode 100644
index 00000000000..538d1f4c521
--- /dev/null
+++ b/src/test/run-pass/borrowck-fixed-length-vecs.rs
@@ -0,0 +1,8 @@
+// xfail-fast   (compile-flags unsupported on windows)
+// compile-flags:--borrowck=err
+
+fn main() {
+    let x = [22]/1;
+    let y = &x[0];
+    assert *y == 22;
+}
\ No newline at end of file