File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
src/tools/miri/tests/pass/tree_borrows Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1- // FIXME: This test is broken since https://github.com/rust-lang/rust/pull/126793,
2- // possibly related to the additional struct between Vec and Unique.
31//@revisions: default uniq
42// We disable the GC for this test because it would change what is printed.
53//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
@@ -32,20 +30,20 @@ fn main() {
3230 // whether we got the distance correct:
3331 // If the output shows
3432 //
35- // |- <XYZ: uniq >
36- // '- <XYZ: uniq >
33+ // ├─ <TAG=base.as_ptr() >
34+ // └─ <TAG=base.as_ptr() >
3735 //
3836 // then `nth_parent` is not big enough.
3937 // The correct value for `nth_parent` should be the minimum
4038 // integer for which the output shows
4139 //
42- // '- <XYZ: uniq, uniq >
40+ // └─ <TAG=base.as_ptr(), base.as_ptr(), ... >
4341 // )
4442 //
4543 // Ultimately we want pointers obtained through independent
4644 // calls of `as_ptr` to be able to alias, which will probably involve
4745 // a new permission that allows aliasing when there is no protector.
48- let nth_parent = if cfg ! ( uniq) { 2 } else { 0 } ;
46+ let nth_parent = if cfg ! ( uniq) { 9 } else { 0 } ;
4947 name ! ( base. as_ptr( ) =>nth_parent) ;
5048 name ! ( base. as_ptr( ) =>nth_parent) ;
5149
Original file line number Diff line number Diff line change 22Warning: this tree is indicative only. Some tags may have been hidden.
330.. 2
44| Act | └─┬──<TAG=root of the allocation>
5- |-----| ├────<TAG=base.as_ptr()>
6- |-----| ├────<TAG=base.as_ptr()>
7- |-----| └─┬──<TAG=raw_parts.0>
8- |-----| ├────<TAG=reconstructed.as_ptr()>
9- |-----| └────<TAG=reconstructed.as_ptr()>
5+ |-----| └─┬──<TAG=base.as_ptr(), base.as_ptr()>
6+ |-----| └─┬──<TAG=raw_parts.0>
7+ |-----| └────<TAG=reconstructed.as_ptr(), reconstructed.as_ptr()>
108──────────────────────────────────────────────────
You can’t perform that action at this time.
0 commit comments