Skip to content

Commit

Permalink
Remove an unnecessary impl
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 16, 2024
1 parent fb98fbb commit 53f7f8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions compiler/rustc_middle/src/ty/structural_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,6 @@ impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for InferConst {
}
}

impl<'tcx> TypeSuperVisitable<TyCtxt<'tcx>> for ty::UnevaluatedConst<'tcx> {
fn super_visit_with<V: TypeVisitor<TyCtxt<'tcx>>>(&self, visitor: &mut V) -> V::Result {
self.args.visit_with(visitor)
}
}

impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for TyAndLayout<'tcx, Ty<'tcx>> {
fn visit_with<V: TypeVisitor<TyCtxt<'tcx>>>(&self, visitor: &mut V) -> V::Result {
visitor.visit_ty(self.ty)
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_type_ir/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,15 @@ impl<I: Interner> TypeVisitor<I> for HasTypeFlagsVisitor {
ControlFlow::Continue(())
}
}

#[inline]
fn visit_error(&mut self, _guar: <I as Interner>::ErrorGuaranteed) -> Self::Result {
if self.flags.intersects(TypeFlags::HAS_ERROR) {
ControlFlow::Break(FoundFlags)
} else {
ControlFlow::Continue(())
}
}
}

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

0 comments on commit 53f7f8c

Please sign in to comment.