borrowck typeck children together with their parent
This commit is contained in:
@@ -397,8 +397,11 @@ fn best_definition_site_of_opaque<'tcx>(
|
||||
return ControlFlow::Continue(());
|
||||
}
|
||||
|
||||
if let Some(hidden_ty) =
|
||||
self.tcx.mir_borrowck(item_def_id).concrete_opaque_types.get(&self.opaque_def_id)
|
||||
if let Some(hidden_ty) = self
|
||||
.tcx
|
||||
.mir_borrowck(item_def_id)
|
||||
.ok()
|
||||
.and_then(|opaque_types| opaque_types.0.get(&self.opaque_def_id))
|
||||
{
|
||||
ControlFlow::Break((hidden_ty.span, item_def_id))
|
||||
} else {
|
||||
@@ -413,9 +416,6 @@ fn best_definition_site_of_opaque<'tcx>(
|
||||
self.tcx
|
||||
}
|
||||
fn visit_expr(&mut self, ex: &'tcx hir::Expr<'tcx>) -> Self::Result {
|
||||
if let hir::ExprKind::Closure(closure) = ex.kind {
|
||||
self.check(closure.def_id)?;
|
||||
}
|
||||
intravisit::walk_expr(self, ex)
|
||||
}
|
||||
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) -> Self::Result {
|
||||
|
||||
Reference in New Issue
Block a user