2022-07-08 11:08:32 -05:00
|
|
|
//@compile-flags: -Zmiri-strict-provenance
|
2022-07-05 04:15:22 -05:00
|
|
|
//@error-pattern: does not exist in the borrow stack
|
2021-02-27 13:03:51 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let a = [1, 2, 3];
|
|
|
|
let s = &a[0..0];
|
|
|
|
assert_eq!(s.len(), 0);
|
|
|
|
assert_eq!(*s.get_unchecked(1), 2);
|
|
|
|
}
|
|
|
|
}
|