}
Node::GenericParam(&GenericParam {
- hir_id: param_hir_id,
+ def_id: param_def_id,
kind: GenericParamKind::Const { default: Some(ct), .. },
..
- }) if ct.hir_id == hir_id => tcx.type_of(tcx.hir().local_def_id(param_hir_id)),
+ }) if ct.hir_id == hir_id => tcx.type_of(param_def_id),
x => tcx.ty_error_with_message(
DUMMY_SP,
self.tcx.hir()
}
fn visit_expr(&mut self, ex: &'tcx Expr<'tcx>) {
- if let hir::ExprKind::Closure { .. } = ex.kind {
- let def_id = self.tcx.hir().local_def_id(ex.hir_id);
- self.check(def_id);
+ if let hir::ExprKind::Closure(closure) = ex.kind {
+ self.check(closure.def_id);
}
intravisit::walk_expr(self, ex);
}
self.tcx.hir()
}
fn visit_expr(&mut self, ex: &'tcx Expr<'tcx>) {
- if let hir::ExprKind::Closure { .. } = ex.kind {
- let def_id = self.tcx.hir().local_def_id(ex.hir_id);
- self.check(def_id);
+ if let hir::ExprKind::Closure(closure) = ex.kind {
+ self.check(closure.def_id);
}
intravisit::walk_expr(self, ex);
}