Use LocalDefId for closures more
This commit is contained in:
@@ -17,8 +17,8 @@ pub(crate) fn dump_closure_profile<'tcx>(tcx: TyCtxt<'tcx>, closure_instance: In
|
||||
return;
|
||||
};
|
||||
|
||||
let closure_def_id = closure_instance.def_id();
|
||||
let typeck_results = tcx.typeck(closure_def_id.expect_local());
|
||||
let closure_def_id = closure_instance.def_id().expect_local();
|
||||
let typeck_results = tcx.typeck(closure_def_id);
|
||||
|
||||
if typeck_results.closure_size_eval.contains_key(&closure_def_id) {
|
||||
let param_env = ty::ParamEnv::reveal_all();
|
||||
|
||||
Reference in New Issue
Block a user