Discard raw pointers from SSA locals.
This commit is contained in:
parent
d45815eb4a
commit
8f1dbe54ea
3 changed files with 45 additions and 2 deletions
|
@ -117,8 +117,10 @@ impl<'tcx> Visitor<'tcx> for SsaLocals {
|
|||
self.assignments[local].insert(LocationExtended::Plain(loc));
|
||||
self.assignment_order.push(local);
|
||||
}
|
||||
PlaceContext::MutatingUse(_) => self.assignments[local] = Set1::Many,
|
||||
// Immutable borrows and AddressOf are taken into account in `SsaLocals::new` by
|
||||
// Anything can happen with raw pointers, so remove them.
|
||||
PlaceContext::NonMutatingUse(NonMutatingUseContext::AddressOf)
|
||||
| PlaceContext::MutatingUse(_) => self.assignments[local] = Set1::Many,
|
||||
// Immutable borrows are taken into account in `SsaLocals::new` by
|
||||
// removing non-freeze locals.
|
||||
PlaceContext::NonMutatingUse(_) => {
|
||||
let set = &mut self.assignments[local];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue