-
Notifications
You must be signed in to change notification settings - Fork 390
Include the name of the created tag in TB's Reborrow events #4387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ help: the accessed tag <TAG> later transitioned to Active due to a child write a | |
LL | *x = 1; | ||
| ^^^^^^ | ||
= help: this transition corresponds to the first write to a 2-phase borrowed mutable reference | ||
help: the accessed tag <TAG> later transitioned to Frozen due to a reborrow (acting as a foreign read access) at offsets [OFFSET] | ||
help: the accessed tag <TAG> later transitioned to Frozen due to a reborrow to create <TAG> (acting as a foreign read access) at offsets [OFFSET] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it clear that the newly created tag is always the more interesting one here, rather than the tag of the pointer that is the input to the reborrow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, because it can be traced with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that's why the alternative solution to the linked issue is to make tag tracking also log reborrows of the tracked tag. But I suspect that will be an unusable amount of information written to the terminal. |
||
--> tests/fail/async-shared-mutable.rs:LL:CC | ||
| | ||
LL | let _: Pin<&_> = f.as_ref(); // Or: `f.as_mut().into_ref()`. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: Undefined Behavior: reborrow through <TAG> at ALLOC[0x0] is forbidden | ||
error: Undefined Behavior: reborrow to create <TAG> through <TAG> at ALLOC[0x0] is forbidden | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new tag doesn't matter here, does it? Creating it failed, so it can't possibly occur anywhere else in the state already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the above is correct then I don't think the new tag should be shown here. |
||
--> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | ||
| | ||
LL | foo(some_xref); | ||
| ^^^^^^^^^ reborrow through <TAG> at ALLOC[0x0] is forbidden | ||
| ^^^^^^^^^ reborrow to create <TAG> through <TAG> at ALLOC[0x0] is forbidden | ||
| | ||
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental | ||
= help: the accessed tag <TAG> has state Disabled which forbids this reborrow (acting as a child read access) | ||
= help: the accessed tag <TAG> has state Disabled which forbids this reborrow to create <TAG> (acting as a child read access) | ||
help: the accessed tag <TAG> was created here, in the initial state Frozen | ||
--> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | ||
| | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.