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