mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
f9edd864df
Co-authored-by: Nikita Popov <github@npopov.com>
15 lines
243 B
Rust
15 lines
243 B
Rust
//@ compile-flags: -O
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#[no_mangle]
|
|
// CHECK-LABEL: @foo
|
|
// CHECK-NOT: unreachable
|
|
pub fn foo(arr: &mut [u32]) {
|
|
for i in 0..arr.len() {
|
|
for j in 0..i {
|
|
assert!(j < arr.len());
|
|
}
|
|
}
|
|
}
|