]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/mir/type_visitable.rs
Rollup merge of #104517 - dfordivam:patch-1, r=cuviper
[rust.git] / compiler / rustc_middle / src / mir / type_visitable.rs
index a136ca4d8c37f0219a620a838c07b21371ac03d0..e7cd497b206a9eacc500ea7f6bf76258e1b0c1a4 100644 (file)
@@ -1,41 +1,9 @@
 //! `TypeVisitable` implementations for MIR types
 
 use super::*;
-use crate::mir;
 
 impl<'tcx, R: Idx, C: Idx> TypeVisitable<'tcx> for BitMatrix<R, C> {
     fn visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<V::BreakTy> {
         ControlFlow::CONTINUE
     }
 }
-
-impl<'tcx> TypeVisitable<'tcx> for mir::UnevaluatedConst<'tcx> {
-    fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
-        visitor.visit_mir_unevaluated(*self)
-    }
-}
-
-impl<'tcx> TypeSuperVisitable<'tcx> for mir::UnevaluatedConst<'tcx> {
-    fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
-        self.substs.visit_with(visitor)
-    }
-}
-
-impl<'tcx> TypeVisitable<'tcx> for ConstantKind<'tcx> {
-    fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
-        visitor.visit_mir_const(*self)
-    }
-}
-
-impl<'tcx> TypeSuperVisitable<'tcx> for ConstantKind<'tcx> {
-    fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
-        match *self {
-            ConstantKind::Ty(c) => c.visit_with(visitor),
-            ConstantKind::Val(_, t) => t.visit_with(visitor),
-            ConstantKind::Unevaluated(uv, t) => {
-                uv.visit_with(visitor)?;
-                t.visit_with(visitor)
-            }
-        }
-    }
-}