Skip to content

Commit 9980415

Browse files
committed
key drop-data computation by ty, not var
1 parent a40e629 commit 9980415

File tree

1 file changed

+2
-2
lines changed
  • src/librustc_mir/borrow_check/nll/type_check

1 file changed

+2
-2
lines changed

src/librustc_mir/borrow_check/nll/type_check/liveness.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ where
6666
liveness: &'gen LivenessResults,
6767
flow_inits: &'gen mut FlowAtLocation<MaybeInitializedPlaces<'flow, 'gcx, 'tcx>>,
6868
move_data: &'gen MoveData<'tcx>,
69-
drop_data: FxHashMap<Local, DropData<'tcx>>,
69+
drop_data: FxHashMap<Ty<'tcx>, DropData<'tcx>>,
7070
}
7171

7272
struct DropData<'tcx> {
@@ -194,7 +194,7 @@ impl<'gen, 'typeck, 'flow, 'gcx, 'tcx> TypeLivenessGenerator<'gen, 'typeck, 'flo
194194
dropped_local, dropped_ty, location
195195
);
196196

197-
let drop_data = self.drop_data.entry(dropped_local).or_insert_with({
197+
let drop_data = self.drop_data.entry(dropped_ty).or_insert_with({
198198
let cx = &mut self.cx;
199199
move || Self::compute_drop_data(cx, dropped_ty)
200200
});

0 commit comments

Comments
 (0)