-
Notifications
You must be signed in to change notification settings - Fork 13.3k
add StorageDead
handling
#45936
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
add StorageDead
handling
#45936
Conversation
// here, in dataflow vector | ||
zero_to_one(sets.gen_set.words_mut(), *move_index); | ||
match stmt.kind { | ||
// skip move out for StorageDead |
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.
could you comment here why we are skipping the move out for StorageDead?
// this analysis only tries to find moves explicitly
// written by the user, so we ignore the move-outs
// created by `StorageDead` and at the beginning
// of a function.
Also, it might be a better idea to handle the move outs for both StorageDead
and the implicit move-out at the beginning of a function. Your call.
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.
r=me with a better comment for StorageDead and the double move-out removed.
@@ -231,8 +231,13 @@ pub(crate) fn drop_flag_effects_for_location<'a, 'gcx, 'tcx, F>( | |||
} | |||
} | |||
} | |||
mir::StatementKind::StorageDead(local) => { |
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.
I don't think this is needed - we already iterate over move-outs the statement before.
@bors r+ |
📌 Commit 5a501cc has been approved by |
⌛ Testing commit 5a501cc8802cb3119e9180b23ff019d13b5997b8 with merge b8123036d2957f059bac389ebbffac65eee0a936... |
💔 Test failed - status-travis |
rebaseing |
5a501cc
to
9e35fd2
Compare
@bors r+ |
📌 Commit 9e35fd2 has been approved by |
☀️ Test successful - status-appveyor, status-travis |
fix #45642
r? @arielb1