2024-02-07 09:30:11 -06:00
|
|
|
//@ run-fail
|
|
|
|
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes
|
2024-02-09 19:07:42 -06:00
|
|
|
//@ error-pattern: slice::get_unchecked requires
|
2024-02-07 09:30:11 -06:00
|
|
|
//@ ignore-debug
|
|
|
|
//@ ignore-wasm32-bare no panic messages
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let sli: &[u8] = &[0];
|
|
|
|
sli.get_unchecked(1);
|
|
|
|
}
|
|
|
|
}
|