Skip to content

Commit 1c8230e

Browse files
Uplift OutlivesPredicate, remove a bunch of unnecessary associated types from Interner
1 parent 28ce588 commit 1c8230e

File tree

15 files changed

+79
-75
lines changed

15 files changed

+79
-75
lines changed

compiler/rustc_borrowck/src/type_check/constraint_conversion.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {
136136

137137
fn convert(
138138
&mut self,
139-
predicate: ty::OutlivesPredicate<ty::GenericArg<'tcx>, ty::Region<'tcx>>,
139+
predicate: ty::OutlivesPredicate<'tcx, ty::GenericArg<'tcx>>,
140140
constraint_category: ConstraintCategory<'tcx>,
141141
) {
142142
debug!("generate: constraints at: {:#?}", self.locations);
@@ -276,7 +276,7 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {
276276
&self,
277277
ty: Ty<'tcx>,
278278
next_outlives_predicates: &mut Vec<(
279-
ty::OutlivesPredicate<ty::GenericArg<'tcx>, ty::Region<'tcx>>,
279+
ty::OutlivesPredicate<'tcx, ty::GenericArg<'tcx>>,
280280
ConstraintCategory<'tcx>,
281281
)>,
282282
) -> Ty<'tcx> {

compiler/rustc_hir_analysis/src/outlives/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use smallvec::smallvec;
99
/// Tracks the `T: 'a` or `'a: 'a` predicates that we have inferred
1010
/// must be added to the struct header.
1111
pub(crate) type RequiredPredicates<'tcx> =
12-
FxIndexMap<ty::OutlivesPredicate<GenericArg<'tcx>, ty::Region<'tcx>>, Span>;
12+
FxIndexMap<ty::OutlivesPredicate<'tcx, ty::GenericArg<'tcx>>, Span>;
1313

1414
/// Given a requirement `T: 'a` or `'b: 'a`, deduce the
1515
/// outlives_component and add it to `required_predicates`

compiler/rustc_infer/src/infer/outlives/env.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ struct OutlivesEnvironmentBuilder<'tcx> {
6464
/// "Region-bound pairs" tracks outlives relations that are known to
6565
/// be true, either because of explicit where-clauses like `T: 'a` or
6666
/// because of implied bounds.
67-
pub type RegionBoundPairs<'tcx> =
68-
FxIndexSet<ty::OutlivesPredicate<GenericKind<'tcx>, Region<'tcx>>>;
67+
pub type RegionBoundPairs<'tcx> = FxIndexSet<ty::OutlivesPredicate<'tcx, GenericKind<'tcx>>>;
6968

7069
impl<'tcx> OutlivesEnvironment<'tcx> {
7170
/// Create a builder using `ParamEnv` and add explicit outlives bounds into it.

compiler/rustc_infer/src/infer/outlives/verify.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
9494
pub fn approx_declared_bounds_from_env(
9595
&self,
9696
alias_ty: ty::AliasTy<'tcx>,
97-
) -> Vec<ty::Binder<'tcx, ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>>> {
97+
) -> Vec<ty::PolyTypeOutlivesPredicate<'tcx>> {
9898
let erased_alias_ty = self.tcx.erase_regions(alias_ty.to_ty(self.tcx));
9999
self.declared_generic_bounds_from_env_for_erased_ty(erased_alias_ty)
100100
}
@@ -193,7 +193,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
193193
fn declared_generic_bounds_from_env(
194194
&self,
195195
generic_ty: Ty<'tcx>,
196-
) -> Vec<ty::Binder<'tcx, ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>>> {
196+
) -> Vec<ty::PolyTypeOutlivesPredicate<'tcx>> {
197197
assert!(matches!(generic_ty.kind(), ty::Param(_) | ty::Placeholder(_)));
198198
self.declared_generic_bounds_from_env_for_erased_ty(generic_ty)
199199
}
@@ -213,7 +213,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
213213
fn declared_generic_bounds_from_env_for_erased_ty(
214214
&self,
215215
erased_ty: Ty<'tcx>,
216-
) -> Vec<ty::Binder<'tcx, ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>>> {
216+
) -> Vec<ty::PolyTypeOutlivesPredicate<'tcx>> {
217217
let tcx = self.tcx;
218218

219219
// To start, collect bounds from user environment. Note that

compiler/rustc_middle/src/infer/canonical.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use std::collections::hash_map::Entry;
3232
use crate::infer::MemberConstraint;
3333
use crate::mir::ConstraintCategory;
3434
use crate::ty::GenericArg;
35-
use crate::ty::{self, List, Region, Ty, TyCtxt, TypeFlags, TypeVisitableExt};
35+
use crate::ty::{self, List, Ty, TyCtxt, TypeFlags, TypeVisitableExt};
3636

3737
pub type Canonical<'tcx, V> = ir::Canonical<TyCtxt<'tcx>, V>;
3838
pub type CanonicalVarInfo<'tcx> = ir::CanonicalVarInfo<TyCtxt<'tcx>>;
@@ -141,7 +141,7 @@ impl<'tcx, R> QueryResponse<'tcx, R> {
141141
}
142142

143143
pub type QueryOutlivesConstraint<'tcx> =
144-
(ty::OutlivesPredicate<GenericArg<'tcx>, Region<'tcx>>, ConstraintCategory<'tcx>);
144+
(ty::OutlivesPredicate<'tcx, GenericArg<'tcx>>, ConstraintCategory<'tcx>);
145145

146146
TrivialTypeTraversalImpls! {
147147
crate::infer::canonical::Certainty,

compiler/rustc_middle/src/ty/context.rs

-10
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
121121
type Abi = abi::Abi;
122122

123123
type Const = ty::Const<'tcx>;
124-
type AliasConst = ty::UnevaluatedConst<'tcx>;
125124
type PlaceholderConst = ty::PlaceholderConst;
126125
type ParamConst = ty::ParamConst;
127126
type BoundConst = ty::BoundVar;
@@ -137,15 +136,6 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
137136
type ParamEnv = ty::ParamEnv<'tcx>;
138137
type Predicate = Predicate<'tcx>;
139138
type Clause = Clause<'tcx>;
140-
type TraitPredicate = ty::TraitPredicate<'tcx>;
141-
type RegionOutlivesPredicate = ty::RegionOutlivesPredicate<'tcx>;
142-
type TypeOutlivesPredicate = ty::TypeOutlivesPredicate<'tcx>;
143-
type ProjectionPredicate = ty::ProjectionPredicate<'tcx>;
144-
type NormalizesTo = ty::NormalizesTo<'tcx>;
145-
type SubtypePredicate = ty::SubtypePredicate<'tcx>;
146-
147-
type CoercePredicate = ty::CoercePredicate<'tcx>;
148-
type ClosureKind = ty::ClosureKind;
149139

150140
type Clauses = ty::Clauses<'tcx>;
151141

compiler/rustc_middle/src/ty/predicate.rs

+12-21
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use rustc_data_structures::captures::Captures;
22
use rustc_data_structures::intern::Interned;
33
use rustc_hir::def_id::DefId;
4-
use rustc_macros::{
5-
extension, HashStable, Lift, TyDecodable, TyEncodable, TypeFoldable, TypeVisitable,
6-
};
4+
use rustc_macros::{extension, HashStable};
75
use rustc_type_ir as ir;
86
use std::cmp::Ordering;
97

@@ -24,6 +22,15 @@ pub type PredicateKind<'tcx> = ir::PredicateKind<TyCtxt<'tcx>>;
2422
pub type NormalizesTo<'tcx> = ir::NormalizesTo<TyCtxt<'tcx>>;
2523
pub type CoercePredicate<'tcx> = ir::CoercePredicate<TyCtxt<'tcx>>;
2624
pub type SubtypePredicate<'tcx> = ir::SubtypePredicate<TyCtxt<'tcx>>;
25+
pub type OutlivesPredicate<'tcx, T> = ir::OutlivesPredicate<TyCtxt<'tcx>, T>;
26+
pub type RegionOutlivesPredicate<'tcx> = OutlivesPredicate<'tcx, ty::Region<'tcx>>;
27+
pub type TypeOutlivesPredicate<'tcx> = OutlivesPredicate<'tcx, Ty<'tcx>>;
28+
pub type PolyTraitPredicate<'tcx> = ty::Binder<'tcx, TraitPredicate<'tcx>>;
29+
pub type PolyRegionOutlivesPredicate<'tcx> = ty::Binder<'tcx, RegionOutlivesPredicate<'tcx>>;
30+
pub type PolyTypeOutlivesPredicate<'tcx> = ty::Binder<'tcx, TypeOutlivesPredicate<'tcx>>;
31+
pub type PolySubtypePredicate<'tcx> = ty::Binder<'tcx, SubtypePredicate<'tcx>>;
32+
pub type PolyCoercePredicate<'tcx> = ty::Binder<'tcx, CoercePredicate<'tcx>>;
33+
pub type PolyProjectionPredicate<'tcx> = ty::Binder<'tcx, ProjectionPredicate<'tcx>>;
2734

2835
/// A statement that can be proven by a trait solver. This includes things that may
2936
/// show up in where clauses, such as trait predicates and projection predicates,
@@ -405,20 +412,6 @@ impl<'tcx> Clause<'tcx> {
405412
}
406413
}
407414

408-
pub type PolyTraitPredicate<'tcx> = ty::Binder<'tcx, TraitPredicate<'tcx>>;
409-
410-
/// `A: B`
411-
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, TyEncodable, TyDecodable)]
412-
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
413-
pub struct OutlivesPredicate<A, B>(pub A, pub B);
414-
pub type RegionOutlivesPredicate<'tcx> = OutlivesPredicate<ty::Region<'tcx>, ty::Region<'tcx>>;
415-
pub type TypeOutlivesPredicate<'tcx> = OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>;
416-
pub type PolyRegionOutlivesPredicate<'tcx> = ty::Binder<'tcx, RegionOutlivesPredicate<'tcx>>;
417-
pub type PolyTypeOutlivesPredicate<'tcx> = ty::Binder<'tcx, TypeOutlivesPredicate<'tcx>>;
418-
pub type PolySubtypePredicate<'tcx> = ty::Binder<'tcx, SubtypePredicate<'tcx>>;
419-
pub type PolyCoercePredicate<'tcx> = ty::Binder<'tcx, CoercePredicate<'tcx>>;
420-
pub type PolyProjectionPredicate<'tcx> = Binder<'tcx, ProjectionPredicate<'tcx>>;
421-
422415
pub trait ToPolyTraitRef<'tcx> {
423416
fn to_poly_trait_ref(&self) -> PolyTraitRef<'tcx>;
424417
}
@@ -545,10 +538,8 @@ impl<'tcx> UpcastFrom<TyCtxt<'tcx>, PolyRegionOutlivesPredicate<'tcx>> for Predi
545538
}
546539
}
547540

548-
impl<'tcx> UpcastFrom<TyCtxt<'tcx>, OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>>
549-
for Predicate<'tcx>
550-
{
551-
fn upcast_from(from: OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>, tcx: TyCtxt<'tcx>) -> Self {
541+
impl<'tcx> UpcastFrom<TyCtxt<'tcx>, TypeOutlivesPredicate<'tcx>> for Predicate<'tcx> {
542+
fn upcast_from(from: TypeOutlivesPredicate<'tcx>, tcx: TyCtxt<'tcx>) -> Self {
552543
ty::Binder::dummy(PredicateKind::Clause(ClauseKind::TypeOutlives(from))).upcast(tcx)
553544
}
554545
}

compiler/rustc_middle/src/ty/print/pretty.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -2860,10 +2860,9 @@ where
28602860
}
28612861
}
28622862

2863-
impl<'tcx, T, U, P: PrettyPrinter<'tcx>> Print<'tcx, P> for ty::OutlivesPredicate<T, U>
2863+
impl<'tcx, T, P: PrettyPrinter<'tcx>> Print<'tcx, P> for ty::OutlivesPredicate<'tcx, T>
28642864
where
28652865
T: Print<'tcx, P>,
2866-
U: Print<'tcx, P>,
28672866
{
28682867
fn print(&self, cx: &mut P) -> Result<(), PrintError> {
28692868
define_scoped_cx!(cx);
@@ -3016,10 +3015,7 @@ forward_display_to_print! {
30163015
ty::Region<'tcx>,
30173016
Ty<'tcx>,
30183017
&'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
3019-
ty::Const<'tcx>,
3020-
3021-
ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>,
3022-
ty::OutlivesPredicate<ty::Region<'tcx>, ty::Region<'tcx>>
3018+
ty::Const<'tcx>
30233019
}
30243020

30253021
define_print! {

compiler/rustc_smir/src/rustc_smir/convert/ty.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -707,12 +707,11 @@ impl<'tcx> Stable<'tcx> for ty::TraitPredicate<'tcx> {
707707
}
708708
}
709709

710-
impl<'tcx, A, B, U, V> Stable<'tcx> for ty::OutlivesPredicate<A, B>
710+
impl<'tcx, T> Stable<'tcx> for ty::OutlivesPredicate<'tcx, T>
711711
where
712-
A: Stable<'tcx, T = U>,
713-
B: Stable<'tcx, T = V>,
712+
T: Stable<'tcx>,
714713
{
715-
type T = stable_mir::ty::OutlivesPredicate<U, V>;
714+
type T = stable_mir::ty::OutlivesPredicate<T::T, Region>;
716715

717716
fn stable(&self, tables: &mut Tables<'_>) -> Self::T {
718717
let ty::OutlivesPredicate(a, b) = self;

compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ pub fn compute_implied_outlives_bounds_compat_inner<'tcx>(
162162
let mut checked_wf_args = rustc_data_structures::fx::FxHashSet::default();
163163
let mut wf_args = vec![ty.into()];
164164

165-
let mut outlives_bounds: Vec<ty::OutlivesPredicate<ty::GenericArg<'tcx>, ty::Region<'tcx>>> =
166-
vec![];
165+
let mut outlives_bounds: Vec<ty::OutlivesPredicate<'tcx, ty::GenericArg<'tcx>>> = vec![];
167166

168167
while let Some(arg) = wf_args.pop() {
169168
if !checked_wf_args.insert(arg) {

compiler/rustc_type_ir/src/const_kind.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_macros::{HashStable_NoContext, TyDecodable, TyEncodable};
55
use rustc_type_ir_macros::{Lift_Generic, TypeFoldable_Generic, TypeVisitable_Generic};
66
use std::fmt;
77

8-
use crate::{DebruijnIndex, DebugWithInfcx, InferCtxtLike, Interner, WithInfcx};
8+
use crate::{self as ty, DebruijnIndex, DebugWithInfcx, InferCtxtLike, Interner, WithInfcx};
99

1010
use self::ConstKind::*;
1111

@@ -29,7 +29,7 @@ pub enum ConstKind<I: Interner> {
2929
/// An unnormalized const item such as an anon const or assoc const or free const item.
3030
/// Right now anything other than anon consts does not actually work properly but this
3131
/// should
32-
Unevaluated(I::AliasConst),
32+
Unevaluated(ty::UnevaluatedConst<I>),
3333

3434
/// Used to hold computed value.
3535
Value(I::ValueConst),

compiler/rustc_type_ir/src/interner.rs

-9
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ pub trait Interner:
7676

7777
// Kinds of consts
7878
type Const: Const<Self>;
79-
type AliasConst: Copy + DebugWithInfcx<Self> + Hash + Eq;
8079
type PlaceholderConst: PlaceholderLike;
8180
type ParamConst: Copy + Debug + Hash + Eq;
8281
type BoundConst: Copy + Debug + Hash + Eq + BoundVarLike<Self>;
@@ -94,14 +93,6 @@ pub trait Interner:
9493
type ParamEnv: Copy + Debug + Hash + Eq;
9594
type Predicate: Predicate<Self>;
9695
type Clause: Clause<Self>;
97-
type TraitPredicate: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
98-
type RegionOutlivesPredicate: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
99-
type TypeOutlivesPredicate: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
100-
type ProjectionPredicate: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
101-
type NormalizesTo: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
102-
type SubtypePredicate: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
103-
type CoercePredicate: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
104-
type ClosureKind: Copy + Debug + Hash + Eq + TypeVisitable<Self>;
10596
type Clauses: Copy + Debug + Hash + Eq + TypeSuperVisitable<Self> + Flags;
10697

10798
fn mk_canonical_var_infos(self, infos: &[CanonicalVarInfo<Self>]) -> Self::CanonicalVars;

compiler/rustc_type_ir/src/ir_print.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ use std::fmt;
22

33
use crate::{
44
AliasTerm, AliasTy, Binder, CoercePredicate, ExistentialProjection, ExistentialTraitRef, FnSig,
5-
Interner, NormalizesTo, ProjectionPredicate, SubtypePredicate, TraitPredicate, TraitRef,
5+
Interner, NormalizesTo, OutlivesPredicate, ProjectionPredicate, SubtypePredicate,
6+
TraitPredicate, TraitRef,
67
};
78

89
pub trait IrPrint<T> {
@@ -58,3 +59,12 @@ define_display_via_print!(
5859
);
5960

6061
define_debug_via_print!(TraitRef, ExistentialTraitRef, ExistentialProjection);
62+
63+
impl<I: Interner, T> fmt::Display for OutlivesPredicate<I, T>
64+
where
65+
I: IrPrint<OutlivesPredicate<I, T>>,
66+
{
67+
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
68+
<I as IrPrint<OutlivesPredicate<I, T>>>::print(self, fmt)
69+
}
70+
}

compiler/rustc_type_ir/src/predicate.rs

+29
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,39 @@ use rustc_macros::{Decodable, Encodable, HashStable_NoContext, TyDecodable, TyEn
66
use rustc_type_ir_macros::{Lift_Generic, TypeFoldable_Generic, TypeVisitable_Generic};
77

88
use crate::inherent::*;
9+
use crate::lift::Lift;
910
use crate::upcast::Upcast;
1011
use crate::visit::TypeVisitableExt as _;
1112
use crate::{self as ty, DebugWithInfcx, InferCtxtLike, Interner, WithInfcx};
1213

14+
/// `A: 'region`
15+
#[derive(derivative::Derivative)]
16+
#[derivative(
17+
Clone(bound = "A: Clone"),
18+
Copy(bound = "A: Copy"),
19+
Hash(bound = "A: Hash"),
20+
PartialEq(bound = "A: PartialEq"),
21+
Eq(bound = "A: Eq"),
22+
Debug(bound = "A: fmt::Debug")
23+
)]
24+
#[derive(TypeVisitable_Generic, TypeFoldable_Generic)]
25+
#[cfg_attr(feature = "nightly", derive(TyDecodable, TyEncodable, HashStable_NoContext))]
26+
pub struct OutlivesPredicate<I: Interner, A>(pub A, pub I::Region);
27+
28+
// FIXME: We manually derive `Lift` because the `derive(Lift_Generic)` doesn't
29+
// understand how to turn `A` to `A::Lifted` in the output `type Lifted`.
30+
impl<I: Interner, U: Interner, A> Lift<U> for OutlivesPredicate<I, A>
31+
where
32+
A: Lift<U>,
33+
I::Region: Lift<U, Lifted = U::Region>,
34+
{
35+
type Lifted = OutlivesPredicate<U, A::Lifted>;
36+
37+
fn lift_to_tcx(self, tcx: U) -> Option<Self::Lifted> {
38+
Some(OutlivesPredicate(self.0.lift_to_tcx(tcx)?, self.1.lift_to_tcx(tcx)?))
39+
}
40+
}
41+
1342
/// A complete reference to a trait. These take numerous guises in syntax,
1443
/// but perhaps the most recognizable form is in a where-clause:
1544
/// ```ignore (illustrative)

compiler/rustc_type_ir/src/predicate_kind.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use rustc_macros::{Decodable, Encodable, HashStable_NoContext, TyDecodable, TyEn
33
use rustc_type_ir_macros::{TypeFoldable_Generic, TypeVisitable_Generic};
44
use std::fmt;
55

6-
use crate::Interner;
6+
use crate::{self as ty, Interner};
77

88
/// A clause is something that can appear in where bounds or be inferred
99
/// by implied bounds.
@@ -15,17 +15,17 @@ pub enum ClauseKind<I: Interner> {
1515
/// Corresponds to `where Foo: Bar<A, B, C>`. `Foo` here would be
1616
/// the `Self` type of the trait reference and `A`, `B`, and `C`
1717
/// would be the type parameters.
18-
Trait(I::TraitPredicate),
18+
Trait(ty::TraitPredicate<I>),
1919

20-
/// `where 'a: 'b`
21-
RegionOutlives(I::RegionOutlivesPredicate),
20+
/// `where 'a: 'r`
21+
RegionOutlives(ty::OutlivesPredicate<I, I::Region>),
2222

23-
/// `where T: 'a`
24-
TypeOutlives(I::TypeOutlivesPredicate),
23+
/// `where T: 'r`
24+
TypeOutlives(ty::OutlivesPredicate<I, I::Ty>),
2525

2626
/// `where <T as TraitRef>::Name == X`, approximately.
2727
/// See the `ProjectionPredicate` struct for details.
28-
Projection(I::ProjectionPredicate),
28+
Projection(ty::ProjectionPredicate<I>),
2929

3030
/// Ensures that a const generic argument to a parameter `const N: u8`
3131
/// is of type `u8`.
@@ -75,7 +75,7 @@ pub enum PredicateKind<I: Interner> {
7575
/// This obligation is created most often when we have two
7676
/// unresolved type variables and hence don't have enough
7777
/// information to process the subtyping obligation yet.
78-
Subtype(I::SubtypePredicate),
78+
Subtype(ty::SubtypePredicate<I>),
7979

8080
/// `T1` coerced to `T2`
8181
///
@@ -85,7 +85,7 @@ pub enum PredicateKind<I: Interner> {
8585
/// obligation yet. At the moment, we actually process coercions
8686
/// very much like subtyping and don't handle the full coercion
8787
/// logic.
88-
Coerce(I::CoercePredicate),
88+
Coerce(ty::CoercePredicate<I>),
8989

9090
/// Constants must be equal. The first component is the const that is expected.
9191
ConstEquate(I::Const, I::Const),
@@ -102,7 +102,7 @@ pub enum PredicateKind<I: Interner> {
102102
/// `T as Trait>::Assoc`, `Projection(<T as Trait>::Assoc, ?x)` constrains `?x`
103103
/// to `<T as Trait>::Assoc` while `NormalizesTo(<T as Trait>::Assoc, ?x)`
104104
/// results in `NoSolution`.
105-
NormalizesTo(I::NormalizesTo),
105+
NormalizesTo(ty::NormalizesTo<I>),
106106

107107
/// Separate from `ClauseKind::Projection` which is used for normalization in new solver.
108108
/// This predicate requires two terms to be equal to eachother.

0 commit comments

Comments
 (0)