Skip to content

Commit 53f7f8c

Browse files
committed
Remove an unnecessary impl
1 parent fb98fbb commit 53f7f8c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

compiler/rustc_middle/src/ty/structural_impls.rs

-6
Original file line numberDiff line numberDiff line change
@@ -632,12 +632,6 @@ impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for InferConst {
632632
}
633633
}
634634

635-
impl<'tcx> TypeSuperVisitable<TyCtxt<'tcx>> for ty::UnevaluatedConst<'tcx> {
636-
fn super_visit_with<V: TypeVisitor<TyCtxt<'tcx>>>(&self, visitor: &mut V) -> V::Result {
637-
self.args.visit_with(visitor)
638-
}
639-
}
640-
641635
impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for TyAndLayout<'tcx, Ty<'tcx>> {
642636
fn visit_with<V: TypeVisitor<TyCtxt<'tcx>>>(&self, visitor: &mut V) -> V::Result {
643637
visitor.visit_ty(self.ty)

compiler/rustc_type_ir/src/visit.rs

+9
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,15 @@ impl<I: Interner> TypeVisitor<I> for HasTypeFlagsVisitor {
447447
ControlFlow::Continue(())
448448
}
449449
}
450+
451+
#[inline]
452+
fn visit_error(&mut self, _guar: <I as Interner>::ErrorGuaranteed) -> Self::Result {
453+
if self.flags.intersects(TypeFlags::HAS_ERROR) {
454+
ControlFlow::Break(FoundFlags)
455+
} else {
456+
ControlFlow::Continue(())
457+
}
458+
}
450459
}
451460

452461
#[derive(Debug, PartialEq, Eq, Copy, Clone)]

0 commit comments

Comments
 (0)