147a2d655f
This reverts commit d08b443fff
.
13 lines
202 B
Rust
13 lines
202 B
Rust
// xfail-stage0
|
|
// -*- rust -*-
|
|
|
|
// error-pattern:bounds check
|
|
|
|
fn main() {
|
|
let vec[int] v = vec(10);
|
|
let int x = 0;
|
|
assert (v.(x) == 10);
|
|
// Bounds-check failure.
|
|
assert (v.(x + 2) == 20);
|
|
}
|