Use LocalDefId for closures more
This commit is contained in:
parent
1202bbaf48
commit
cf2433a74f
29 changed files with 164 additions and 171 deletions
|
@ -59,7 +59,7 @@ pub type UpvarCaptureMap = FxHashMap<UpvarId, UpvarCapture>;
|
|||
|
||||
/// Given the closure DefId this map provides a map of root variables to minimum
|
||||
/// set of `CapturedPlace`s that need to be tracked to support all captures of that closure.
|
||||
pub type MinCaptureInformationMap<'tcx> = FxHashMap<DefId, RootVariableMinCaptureList<'tcx>>;
|
||||
pub type MinCaptureInformationMap<'tcx> = FxHashMap<LocalDefId, RootVariableMinCaptureList<'tcx>>;
|
||||
|
||||
/// Part of `MinCaptureInformationMap`; Maps a root variable to the list of `CapturedPlace`.
|
||||
/// Used to track the minimum set of `Place`s that need to be captured to support all
|
||||
|
@ -253,7 +253,7 @@ impl<'tcx> CapturedPlace<'tcx> {
|
|||
|
||||
fn symbols_for_closure_captures<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
def_id: (LocalDefId, DefId),
|
||||
def_id: (LocalDefId, LocalDefId),
|
||||
) -> Vec<Symbol> {
|
||||
let typeck_results = tcx.typeck(def_id.0);
|
||||
let captures = typeck_results.closure_min_captures_flattened(def_id.1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue