about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/structural_impls.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-28 09:01:33 +0000
committerbors <bors@rust-lang.org>2021-01-28 09:01:33 +0000
commit0e190206e2ff0c13d64701d9b4145bf89a2d0cab (patch)
treef081fe04717328752fade190520b7c3b1579565b /compiler/rustc_middle/src/ty/structural_impls.rs
parente32f372c4203b2527221b313cf63b05ea178e8a9 (diff)
parentf3dfbfc8f5f2b17c7f6fe12b4ba48f589d54dc87 (diff)
downloadrust-0e190206e2ff0c13d64701d9b4145bf89a2d0cab.tar.gz
rust-0e190206e2ff0c13d64701d9b4145bf89a2d0cab.zip
Auto merge of #81461 - JohnTitor:rollup-b0ij25f, r=JohnTitor
Rollup of 13 pull requests

Successful merges:

 - #70904 (Stabilize `Seek::stream_position` (feature `seek_convenience`))
 - #79951 (Refractor a few more types to `rustc_type_ir` )
 - #80868 (Print failure message on all tests that should panic, but don't)
 - #81062 (Improve diagnostics for Precise Capture)
 - #81277 (Make more traits of the From/Into family diagnostic items)
 - #81284 (Make `-Z time-passes` less noisy)
 - #81379 (Improve URLs handling)
 - #81416 (Tweak suggestion for missing field in patterns)
 - #81426 (const_evaluatable: expand abstract consts in try_unify)
 - #81428 (compiletest: Add two more unit tests)
 - #81430 (add const_evaluatable_checked test)
 - #81433 (const_evaluatable: stop looking into type aliases)
 - #81445 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_middle/src/ty/structural_impls.rs')
-rw-r--r--compiler/rustc_middle/src/ty/structural_impls.rs59
1 files changed, 1 insertions, 58 deletions
diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs
index 44c173e356d..0ca94a9f180 100644
--- a/compiler/rustc_middle/src/ty/structural_impls.rs
+++ b/compiler/rustc_middle/src/ty/structural_impls.rs
@@ -111,81 +111,24 @@ impl fmt::Debug for ty::FreeRegion {
     }
 }
 
-impl fmt::Debug for ty::Variance {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.write_str(match *self {
-            ty::Covariant => "+",
-            ty::Contravariant => "-",
-            ty::Invariant => "o",
-            ty::Bivariant => "*",
-        })
-    }
-}
-
 impl fmt::Debug for ty::FnSig<'tcx> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         write!(f, "({:?}; c_variadic: {})->{:?}", self.inputs(), self.c_variadic, self.output())
     }
 }
 
-impl fmt::Debug for ty::TyVid {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        write!(f, "_#{}t", self.index)
-    }
-}
-
 impl<'tcx> fmt::Debug for ty::ConstVid<'tcx> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         write!(f, "_#{}c", self.index)
     }
 }
 
-impl fmt::Debug for ty::IntVid {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        write!(f, "_#{}i", self.index)
-    }
-}
-
-impl fmt::Debug for ty::FloatVid {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        write!(f, "_#{}f", self.index)
-    }
-}
-
 impl fmt::Debug for ty::RegionVid {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         write!(f, "'_#{}r", self.index())
     }
 }
 
-impl fmt::Debug for ty::InferTy {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        match *self {
-            ty::TyVar(ref v) => v.fmt(f),
-            ty::IntVar(ref v) => v.fmt(f),
-            ty::FloatVar(ref v) => v.fmt(f),
-            ty::FreshTy(v) => write!(f, "FreshTy({:?})", v),
-            ty::FreshIntTy(v) => write!(f, "FreshIntTy({:?})", v),
-            ty::FreshFloatTy(v) => write!(f, "FreshFloatTy({:?})", v),
-        }
-    }
-}
-
-impl fmt::Debug for ty::IntVarValue {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        match *self {
-            ty::IntType(ref v) => v.fmt(f),
-            ty::UintType(ref v) => v.fmt(f),
-        }
-    }
-}
-
-impl fmt::Debug for ty::FloatVarValue {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        self.0.fmt(f)
-    }
-}
-
 impl fmt::Debug for ty::TraitRef<'tcx> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         with_no_trimmed_paths(|| fmt::Display::fmt(self, f))
@@ -274,7 +217,7 @@ TrivialTypeFoldableAndLiftImpls! {
     u64,
     String,
     crate::middle::region::Scope,
-    ::rustc_ast::FloatTy,
+    crate::ty::FloatTy,
     ::rustc_ast::InlineAsmOptions,
     ::rustc_ast::InlineAsmTemplatePiece,
     ::rustc_ast::NodeId,