Add a test for that last bug. Oops.
This commit is contained in:
parent
ea8d4d7f17
commit
e5757923cd
6
src/test/run-fail/small-negative-indexing.rs
Normal file
6
src/test/run-fail/small-negative-indexing.rs
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
fn main() {
|
||||
let v = vec::from_fn(1024u) {|n| n};
|
||||
// this should trip a bounds check
|
||||
log(error, v[-1i8]);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user