Skip to content

Commit c9264a1

Browse files
committed
Don't double visit HirIds of inferred const/types
1 parent f4b7735 commit c9264a1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

compiler/rustc_hir/src/intravisit.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,6 @@ pub fn walk_unambig_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) ->
980980
Some(ambig_ty) => visitor.visit_ty(ambig_ty),
981981
None => {
982982
let Ty { hir_id, span, kind: _ } = typ;
983-
try_visit!(visitor.visit_id(*hir_id));
984983
visitor.visit_infer(*hir_id, *span, InferKind::Ty(typ))
985984
}
986985
}
@@ -1046,7 +1045,6 @@ pub fn walk_unambig_const_arg<'v, V: Visitor<'v>>(
10461045
Some(ambig_ct) => visitor.visit_const_arg(ambig_ct),
10471046
None => {
10481047
let ConstArg { hir_id, kind: _ } = const_arg;
1049-
try_visit!(visitor.visit_id(*hir_id));
10501048
visitor.visit_infer(*hir_id, const_arg.span(), InferKind::Const(const_arg))
10511049
}
10521050
}

0 commit comments

Comments
 (0)