Skip to content

Commit

Permalink
Target of name is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanille-N committed Jun 22, 2023
1 parent 6db68aa commit d3e83e1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion tests/pass/tree_borrows/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ fn main() {
// decimal digits to verify proper padding.
unsafe fn alignment_check() {
let data: &mut [u8] = &mut [0; 1024];
name!(data.as_ptr()=>2, "data");
name!(data.as_ptr(), "data");
name!(data.as_ptr(), "data");
let alloc_id = alloc_id!(data.as_ptr());
let x = &mut data[1];
name!(x as *mut _, "data[1]");
Expand Down
2 changes: 1 addition & 1 deletion tests/pass/tree_borrows/formatting.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Warning: this tree is indicative only. Some tags may have been hidden.
0.. 1.. 2.. 10.. 11..100..101..1000..1001..1024
| Act| Act| Act| Act| Act| Act| Act| Act| Act| └─┬──<TAG=root of the allocation>
| Res| Act| Res| Act| Res| Act| Res| Act| Res| └─┬──<TAG=data>
| Res| Act| Res| Act| Res| Act| Res| Act| Res| └─┬──<TAG=data, data>
|----| Act|----|?Dis|----|?Dis| ----| ?Dis| ----| ├────<TAG=data[1]>
|----|----|----| Act|----|?Dis| ----| ?Dis| ----| ├────<TAG=data[10]>
|----|----|----|----|----| Frz| ----| ?Dis| ----| ├────<TAG=data[100]>
Expand Down
6 changes: 3 additions & 3 deletions tests/pass/tree_borrows/unique.default.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ Warning: this tree is indicative only. Some tags may have been hidden.
0.. 1
| Act| └─┬──<TAG=root of the allocation>
| Res| └─┬──<TAG=base>
| Res| └────<TAG=raw, uniq>
| Res| └────<TAG=raw, uniq, uniq>
──────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────
Warning: this tree is indicative only. Some tags may have been hidden.
0.. 1
| Act| └─┬──<TAG=root of the allocation>
| Act| └─┬──<TAG=base>
| Act| └────<TAG=raw, uniq>
| Act| └────<TAG=raw, uniq, uniq>
──────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────
Warning: this tree is indicative only. Some tags may have been hidden.
0.. 1
| Act| └─┬──<TAG=root of the allocation>
| Act| └─┬──<TAG=base>
| Act| └────<TAG=raw, uniq>
| Act| └────<TAG=raw, uniq, uniq>
──────────────────────────────────────────────────────────────────────
1 change: 1 addition & 0 deletions tests/pass/tree_borrows/unique.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fn main() {
// and uninitialized permissions.
let uniq = Unique::new_unchecked(raw);
name!(uniq.as_ptr(), "uniq");
name!(uniq.as_ptr(), "uniq");
print_state!(alloc_id);

// We can activate the Unique and use it mutably.
Expand Down
6 changes: 3 additions & 3 deletions tests/pass/tree_borrows/unique.uniq.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ Warning: this tree is indicative only. Some tags may have been hidden.
| Act| └─┬──<TAG=root of the allocation>
| Res| └─┬──<TAG=base>
| Res| └─┬──<TAG=raw>
|----| └────<TAG=uniq>
|----| └────<TAG=uniq, uniq>
──────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────
Warning: this tree is indicative only. Some tags may have been hidden.
0.. 1
| Act| └─┬──<TAG=root of the allocation>
| Act| └─┬──<TAG=base>
| Act| └─┬──<TAG=raw>
| Act| └────<TAG=uniq>
| Act| └────<TAG=uniq, uniq>
──────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────
Warning: this tree is indicative only. Some tags may have been hidden.
0.. 1
| Act| └─┬──<TAG=root of the allocation>
| Act| └─┬──<TAG=base>
| Act| └─┬──<TAG=raw>
| Dis| └────<TAG=uniq>
| Dis| └────<TAG=uniq, uniq>
──────────────────────────────────────────────────────────────────────

0 comments on commit d3e83e1

Please sign in to comment.