2021-11-13 14:40:26 -06:00
|
|
|
// compile-flags: -Zmiri-tag-raw-pointers
|
2022-02-05 18:44:56 -06: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);
|
|
|
|
}
|
|
|
|
}
|