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.
3
1
//@revisions: default uniq
4
2
// We disable the GC for this test because it would change what is printed.
5
3
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
@@ -32,20 +30,20 @@ fn main() {
32
30
// whether we got the distance correct:
33
31
// If the output shows
34
32
//
35
- // |- <XYZ: uniq >
36
- // '- <XYZ: uniq >
33
+ // ├─ <TAG=base.as_ptr() >
34
+ // └─ <TAG=base.as_ptr() >
37
35
//
38
36
// then `nth_parent` is not big enough.
39
37
// The correct value for `nth_parent` should be the minimum
40
38
// integer for which the output shows
41
39
//
42
- // '- <XYZ: uniq, uniq >
40
+ // └─ <TAG=base.as_ptr(), base.as_ptr(), ... >
43
41
// )
44
42
//
45
43
// Ultimately we want pointers obtained through independent
46
44
// calls of `as_ptr` to be able to alias, which will probably involve
47
45
// 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 } ;
49
47
name ! ( base. as_ptr( ) =>nth_parent) ;
50
48
name ! ( base. as_ptr( ) =>nth_parent) ;
51
49
Original file line number Diff line number Diff line change 2
2
Warning: this tree is indicative only. Some tags may have been hidden.
3
3
0.. 2
4
4
| 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()>
10
8
──────────────────────────────────────────────────
You can’t perform that action at this time.
0 commit comments