diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index ee23c9c4897..b2a379064d6 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -26,9 +26,9 @@ use crate::traits::solve::{ }; use crate::ty::{ self, AdtDef, AdtDefData, AdtKind, Binder, Clause, Const, ConstData, GenericParamDefKind, - ImplPolarity, InferTy, List, ParamConst, ParamTy, PolyExistentialPredicate, PolyFnSig, - Predicate, PredicateKind, Region, RegionKind, ReprOptions, TraitObjectVisitor, Ty, TyKind, - TyVid, TypeAndMut, Visibility, + ImplPolarity, List, ParamConst, ParamTy, PolyExistentialPredicate, PolyFnSig, Predicate, + PredicateKind, Region, RegionKind, ReprOptions, TraitObjectVisitor, Ty, TyKind, TyVid, + TypeAndMut, Visibility, }; use crate::ty::{GenericArg, GenericArgs, GenericArgsRef}; use rustc_ast::{self as ast, attr}; @@ -95,7 +95,6 @@ impl<'tcx> Interner for TyCtxt<'tcx> { type ParamTy = ParamTy; type BoundTy = ty::BoundTy; type PlaceholderTy = ty::PlaceholderType; - type InferTy = InferTy; type ErrorGuaranteed = ErrorGuaranteed; type BoundExistentialPredicates = &'tcx List>; diff --git a/compiler/rustc_type_ir/src/debug.rs b/compiler/rustc_type_ir/src/debug.rs index 4ea3eb3e84f..a76374efc72 100644 --- a/compiler/rustc_type_ir/src/debug.rs +++ b/compiler/rustc_type_ir/src/debug.rs @@ -1,4 +1,4 @@ -use crate::{Interner, UniverseIndex}; +use crate::{InferTy, Interner, UniverseIndex}; use core::fmt; use std::marker::PhantomData; @@ -6,7 +6,7 @@ use std::marker::PhantomData; pub trait InferCtxtLike { type Interner: Interner; - fn universe_of_ty(&self, ty: ::InferTy) -> Option; + fn universe_of_ty(&self, ty: InferTy) -> Option; fn universe_of_lt( &self, @@ -22,7 +22,7 @@ pub struct NoInfcx(PhantomData); impl InferCtxtLike for NoInfcx { type Interner = I; - fn universe_of_ty(&self, _ty: ::InferTy) -> Option { + fn universe_of_ty(&self, _ty: InferTy) -> Option { None } diff --git a/compiler/rustc_type_ir/src/interner.rs b/compiler/rustc_type_ir/src/interner.rs index da504c54fdd..3a00115aade 100644 --- a/compiler/rustc_type_ir/src/interner.rs +++ b/compiler/rustc_type_ir/src/interner.rs @@ -27,7 +27,6 @@ pub trait Interner: Sized { type ParamTy: Clone + Debug + Hash + Ord; type BoundTy: Clone + Debug + Hash + Ord; type PlaceholderTy: Clone + Debug + Hash + Ord; - type InferTy: Clone + DebugWithInfcx + Hash + Ord; // Things stored inside of tys type ErrorGuaranteed: Clone + Debug + Hash + Ord; diff --git a/compiler/rustc_type_ir/src/ty_kind.rs b/compiler/rustc_type_ir/src/ty_kind.rs index f31c5069b15..53446c41f31 100644 --- a/compiler/rustc_type_ir/src/ty_kind.rs +++ b/compiler/rustc_type_ir/src/ty_kind.rs @@ -281,7 +281,7 @@ pub enum TyKind { /// correctly deal with higher ranked types. Though unlike placeholders, /// that universe is stored in the `InferCtxt` instead of directly /// inside of the type. - Infer(I::InferTy), + Infer(InferTy), /// A placeholder for a type which could not be computed; this is /// propagated to avoid useless error messages. @@ -491,7 +491,6 @@ where I::BoundTy: HashStable, I::ParamTy: HashStable, I::PlaceholderTy: HashStable, - I::InferTy: HashStable, I::ErrorGuaranteed: HashStable, { #[inline] @@ -922,7 +921,7 @@ impl fmt::Debug for InferTy { } } -impl> DebugWithInfcx for InferTy { +impl DebugWithInfcx for InferTy { fn fmt>( this: WithInfcx<'_, Infcx, &Self>, f: &mut fmt::Formatter<'_>,