Move tests from test/run-fail
to UI
This commit is contained in:
parent
43271a39ad
commit
e69748ba4f
160 changed files with 404 additions and 125 deletions
10
src/test/ui/array-slice-vec/bounds-check-no-overflow.rs
Normal file
10
src/test/ui/array-slice-vec/bounds-check-no-overflow.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
// run-fail
|
||||
// error-pattern:index out of bounds
|
||||
|
||||
use std::usize;
|
||||
use std::mem::size_of;
|
||||
|
||||
fn main() {
|
||||
let xs = [1, 2, 3];
|
||||
xs[usize::MAX / size_of::<isize>() + 1];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue