diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-16 11:31:18 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-16 14:15:44 +0000 |
| commit | 53f7f8ce5cb01a4bdef70b0bdb4aa812fe548ce7 (patch) | |
| tree | 5e4c734f6b0afa63724f0818939faf16bfed2f8d | |
| parent | fb98fbb759cf7b2e3cb262bf3621407cae9e3c6d (diff) | |
| download | rust-53f7f8ce5cb01a4bdef70b0bdb4aa812fe548ce7.tar.gz rust-53f7f8ce5cb01a4bdef70b0bdb4aa812fe548ce7.zip | |
Remove an unnecessary impl
| -rw-r--r-- | compiler/rustc_middle/src/ty/structural_impls.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_type_ir/src/visit.rs | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index 33c04b41117..00ea87690c1 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -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) diff --git a/compiler/rustc_type_ir/src/visit.rs b/compiler/rustc_type_ir/src/visit.rs index d604199b8e0..6ec38b78fc2 100644 --- a/compiler/rustc_type_ir/src/visit.rs +++ b/compiler/rustc_type_ir/src/visit.rs @@ -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)] |
