2022-04-01 14:10:24 -04:00
|
|
|
// compile-flags: -Zmiri-strict-provenance
|
2022-02-05 19:44:56 -05:00
|
|
|
// error-pattern: does not exist in the borrow stack
|
2021-02-27 20:03:51 +01: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);
|
|
|
|
}
|
|
|
|
}
|