Put Local, Static and Promoted as one Base variant of Place
This commit is contained in:
parent
1999a22881
commit
0f993d5a7a
63 changed files with 441 additions and 352 deletions
|
@ -330,7 +330,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
|
|||
}
|
||||
|
||||
fn drop_flag(&mut self, index: MovePathIndex) -> Option<Place<'tcx>> {
|
||||
self.drop_flags.get(&index).map(|t| Place::Local(*t))
|
||||
self.drop_flags.get(&index).map(|t| Place::Base(PlaceBase::Local(*t)))
|
||||
}
|
||||
|
||||
/// create a patch that elaborates all drops in the input
|
||||
|
@ -543,7 +543,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
|
|||
if let Some(&flag) = self.drop_flags.get(&path) {
|
||||
let span = self.patch.source_info_for_location(self.mir, loc).span;
|
||||
let val = self.constant_bool(span, val.value());
|
||||
self.patch.add_assign(loc, Place::Local(flag), val);
|
||||
self.patch.add_assign(loc, Place::Base(PlaceBase::Local(flag)), val);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -552,7 +552,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
|
|||
let span = self.patch.source_info_for_location(self.mir, loc).span;
|
||||
let false_ = self.constant_bool(span, false);
|
||||
for flag in self.drop_flags.values() {
|
||||
self.patch.add_assign(loc, Place::Local(*flag), false_.clone());
|
||||
self.patch.add_assign(loc, Place::Base(PlaceBase::Local(*flag)), false_.clone());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue