-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[drop tracking] Visit break expressions #106699
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jan 11, 2023
vincenzopalazzo
approved these changes
Jan 12, 2023
albertlarsan68
requested changes
Jan 12, 2023
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.
rustbot
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 12, 2023
This fixes rust-lang#102383 by remembering to visit the expression in `break expr` when building the drop tracking CFG. Missing this step was causing an off-by-one error which meant after a number of awaits we'd be looking for dropped values at the wrong point in the code. Additionally, this changes the order of traversal for assignment expressions to visit the rhs and then the lhs. This matches what is done elsewhere.
eholk
force-pushed
the
await-chains-drop-tracking
branch
from
January 12, 2023 20:16
a511921
to
d32f3fe
Compare
wesleywiser
approved these changes
Jan 19, 2023
compiler/rustc_hir_typeck/src/generator_interior/drop_ranges/cfg_build.rs
Show resolved
Hide resolved
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Jan 19, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 20, 2023
…r=wesleywiser [drop tracking] Visit break expressions This fixes rust-lang#102383 by remembering to visit the expression in `break expr` when building the drop tracking CFG. Missing this step was causing an off-by-one error which meant after a number of awaits we'd be looking for dropped values at the wrong point in the code. Additionally, this changes the order of traversal for assignment expressions to visit the rhs and then the lhs. This matches what is done elsewhere. Finally, this improves some of the debugging output (for example, the CFG visualizer) to make it easier to figure out these sorts of issues.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 20, 2023
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#106699 ([drop tracking] Visit break expressions ) - rust-lang#106738 (Fix known-bug annotations) - rust-lang#106891 (Tweak "borrow closure argument" suggestion) - rust-lang#106928 (add raw identifier for keyword in suggestion) - rust-lang#107065 (Clippy: Make sure to include in beta: Move `unchecked_duration_subtraction` to pedantic) - rust-lang#107068 (autoderive Subdiagnostic for AddtoExternBlockSuggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #102383 by remembering to visit the expression in
break expr
when building the drop tracking CFG. Missing this step was causing an off-by-one error which meant after a number of awaits we'd belooking for dropped values at the wrong point in the code.
Additionally, this changes the order of traversal for assignment expressions to visit the rhs and then the lhs. This matches what is done elsewhere.
Finally, this improves some of the debugging output (for example, the CFG visualizer) to make it easier to figure out these sorts of issues.