]> git.lizzy.rs Git - rust.git/commitdiff
random forgotten test case
authorNiko Matsakis <niko@alum.mit.edu>
Thu, 14 Jun 2012 23:27:44 +0000 (16:27 -0700)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 19 Jun 2012 18:52:39 +0000 (11:52 -0700)
src/test/run-pass/borrowck-fixed-length-vecs.rs [new file with mode: 0644]

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 (file)
index 0000000..538d1f4
--- /dev/null
@@ -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