diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-06-14 16:27:44 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-06-19 11:52:39 -0700 |
| commit | 6c056fba4db7bd85a5fb3610bec6c00a7ad64f81 (patch) | |
| tree | 0ffa1557009f93314afad0d91924012ea5c61e34 /src | |
| parent | 2a128fa205f36074c8fbf4bc490e1ad0f76f38f6 (diff) | |
| download | rust-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.rs | 8 |
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 |
