2022-07-08 16:08:32 +00:00
|
|
|
//@compile-flags: -Zmiri-strict-provenance
|
2022-07-13 18:59:33 -04:00
|
|
|
//@error-pattern: /reborrow .* tag 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);
|
|
|
|
}
|
|
|
|
}
|