fix tree borrows Unique test
This commit is contained in:
parent
7383401e08
commit
14f9284ebe
@ -1,5 +1,3 @@
|
|||||||
// FIXME: This test is broken since https://github.com/rust-lang/rust/pull/126793,
|
|
||||||
// possibly related to the additional struct between Vec and Unique.
|
|
||||||
//@revisions: default uniq
|
//@revisions: default uniq
|
||||||
// We disable the GC for this test because it would change what is printed.
|
// We disable the GC for this test because it would change what is printed.
|
||||||
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
|
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
|
||||||
@ -32,20 +30,20 @@ fn main() {
|
|||||||
// whether we got the distance correct:
|
// whether we got the distance correct:
|
||||||
// If the output shows
|
// If the output shows
|
||||||
//
|
//
|
||||||
// |- <XYZ: uniq>
|
// ├─ <TAG=base.as_ptr()>
|
||||||
// '- <XYZ: uniq>
|
// └─ <TAG=base.as_ptr()>
|
||||||
//
|
//
|
||||||
// then `nth_parent` is not big enough.
|
// then `nth_parent` is not big enough.
|
||||||
// The correct value for `nth_parent` should be the minimum
|
// The correct value for `nth_parent` should be the minimum
|
||||||
// integer for which the output shows
|
// integer for which the output shows
|
||||||
//
|
//
|
||||||
// '- <XYZ: uniq, uniq>
|
// └─ <TAG=base.as_ptr(), base.as_ptr(), ...>
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
// Ultimately we want pointers obtained through independent
|
// Ultimately we want pointers obtained through independent
|
||||||
// calls of `as_ptr` to be able to alias, which will probably involve
|
// calls of `as_ptr` to be able to alias, which will probably involve
|
||||||
// a new permission that allows aliasing when there is no protector.
|
// a new permission that allows aliasing when there is no protector.
|
||||||
let nth_parent = if cfg!(uniq) { 2 } else { 0 };
|
let nth_parent = if cfg!(uniq) { 9 } else { 0 };
|
||||||
name!(base.as_ptr()=>nth_parent);
|
name!(base.as_ptr()=>nth_parent);
|
||||||
name!(base.as_ptr()=>nth_parent);
|
name!(base.as_ptr()=>nth_parent);
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
Warning: this tree is indicative only. Some tags may have been hidden.
|
Warning: this tree is indicative only. Some tags may have been hidden.
|
||||||
0.. 2
|
0.. 2
|
||||||
| Act | └─┬──<TAG=root of the allocation>
|
| Act | └─┬──<TAG=root of the allocation>
|
||||||
|-----| ├────<TAG=base.as_ptr()>
|
|-----| └─┬──<TAG=base.as_ptr(), base.as_ptr()>
|
||||||
|-----| ├────<TAG=base.as_ptr()>
|
|-----| └─┬──<TAG=raw_parts.0>
|
||||||
|-----| └─┬──<TAG=raw_parts.0>
|
|-----| └────<TAG=reconstructed.as_ptr(), reconstructed.as_ptr()>
|
||||||
|-----| ├────<TAG=reconstructed.as_ptr()>
|
|
||||||
|-----| └────<TAG=reconstructed.as_ptr()>
|
|
||||||
──────────────────────────────────────────────────
|
──────────────────────────────────────────────────
|
||||||
|
Loading…
Reference in New Issue
Block a user