2024-02-07 09:30:11 -06:00
|
|
|
//@ run-fail
|
2024-04-03 07:54:03 -05:00
|
|
|
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=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
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let sli: &[u8] = &[0];
|
|
|
|
sli.get_unchecked(1);
|
|
|
|
}
|
|
|
|
}
|