key drop-data computation by ty, not var
This commit is contained in:
parent
a40e629a33
commit
9980415fbd
1 changed files with 2 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ where
|
|||
liveness: &'gen LivenessResults,
|
||||
flow_inits: &'gen mut FlowAtLocation<MaybeInitializedPlaces<'flow, 'gcx, 'tcx>>,
|
||||
move_data: &'gen MoveData<'tcx>,
|
||||
drop_data: FxHashMap<Local, DropData<'tcx>>,
|
||||
drop_data: FxHashMap<Ty<'tcx>, DropData<'tcx>>,
|
||||
}
|
||||
|
||||
struct DropData<'tcx> {
|
||||
|
|
@ -194,7 +194,7 @@ impl<'gen, 'typeck, 'flow, 'gcx, 'tcx> TypeLivenessGenerator<'gen, 'typeck, 'flo
|
|||
dropped_local, dropped_ty, location
|
||||
);
|
||||
|
||||
let drop_data = self.drop_data.entry(dropped_local).or_insert_with({
|
||||
let drop_data = self.drop_data.entry(dropped_ty).or_insert_with({
|
||||
let cx = &mut self.cx;
|
||||
move || Self::compute_drop_data(cx, dropped_ty)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue