@@ -3,9 +3,9 @@ use crate::{tls, Identifier, TypeKind};
3
3
use chalk_ir:: { could_match:: CouldMatch , UnificationDatabase } ;
4
4
use chalk_ir:: { debug:: Angle , Variance } ;
5
5
use chalk_ir:: {
6
- debug:: SeparatorTraitRef , AdtId , AliasTy , AssocTypeId , Binders , CanonicalVarKinds , ClosureId ,
6
+ debug:: SeparatorTraitRef , AdtId , AliasTy , AssocItemId , Binders , CanonicalVarKinds , ClosureId ,
7
7
FnDefId , ForeignDefId , GeneratorId , GenericArg , Goal , Goals , ImplId , IntTy , Lifetime , OpaqueTy ,
8
- OpaqueTyId , ProgramClause , ProgramClauseImplication , ProgramClauses , ProjectionTy , Scalar ,
8
+ OpaqueTyId , ProgramClause , ProgramClauseImplication , ProgramClauses , ProjectionTerm , Scalar ,
9
9
Substitution , TraitId , Ty , TyKind , UintTy , Variances ,
10
10
} ;
11
11
use chalk_solve:: rust_ir:: {
@@ -95,7 +95,7 @@ pub struct Program {
95
95
pub well_known_traits : BTreeMap < WellKnownTrait , TraitId < ChalkIr > > ,
96
96
97
97
/// For each associated ty declaration `type Foo` found in a trait:
98
- pub associated_ty_data : BTreeMap < AssocTypeId < ChalkIr > , Arc < AssociatedTyDatum < ChalkIr > > > ,
98
+ pub associated_ty_data : BTreeMap < AssocItemId < ChalkIr > , Arc < AssociatedTyDatum < ChalkIr > > > ,
99
99
100
100
/// For each user-specified clause
101
101
pub custom_clauses : Vec < ProgramClause < ChalkIr > > ,
@@ -149,13 +149,13 @@ impl tls::DebugContext for Program {
149
149
150
150
fn debug_assoc_type_id (
151
151
& self ,
152
- assoc_type_id : AssocTypeId < ChalkIr > ,
152
+ assoc_type_id : AssocItemId < ChalkIr > ,
153
153
fmt : & mut fmt:: Formatter < ' _ > ,
154
154
) -> Result < ( ) , fmt:: Error > {
155
155
if let Some ( d) = self . associated_ty_data . get ( & assoc_type_id) {
156
156
write ! ( fmt, "({:?}::{})" , d. trait_id, d. name)
157
157
} else {
158
- fmt. debug_struct ( "InvalidAssocTypeId " )
158
+ fmt. debug_struct ( "InvalidAssocItemId " )
159
159
. field ( "index" , & assoc_type_id. 0 )
160
160
. finish ( )
161
161
}
@@ -202,7 +202,7 @@ impl tls::DebugContext for Program {
202
202
203
203
fn debug_projection_ty (
204
204
& self ,
205
- projection_ty : & ProjectionTy < ChalkIr > ,
205
+ projection_ty : & ProjectionTerm < ChalkIr > ,
206
206
fmt : & mut fmt:: Formatter < ' _ > ,
207
207
) -> Result < ( ) , fmt:: Error > {
208
208
let ( associated_ty_data, trait_params, other_params) = self . split_projection ( projection_ty) ;
@@ -384,7 +384,7 @@ impl RustIrDatabase<ChalkIr> for Program {
384
384
self . custom_clauses . clone ( )
385
385
}
386
386
387
- fn associated_ty_data ( & self , ty : AssocTypeId < ChalkIr > ) -> Arc < AssociatedTyDatum < ChalkIr > > {
387
+ fn associated_ty_data ( & self , ty : AssocItemId < ChalkIr > ) -> Arc < AssociatedTyDatum < ChalkIr > > {
388
388
self . associated_ty_data [ & ty] . clone ( )
389
389
}
390
390
@@ -582,7 +582,7 @@ impl RustIrDatabase<ChalkIr> for Program {
582
582
// normally acceptable, but causes the re-parse tests for the .chalk syntax
583
583
// writer to fail. This is because they use the `Eq` implementation on
584
584
// Program, which checks for name equality.
585
- fn assoc_type_name ( & self , assoc_type_id : AssocTypeId < ChalkIr > ) -> String {
585
+ fn assoc_type_name ( & self , assoc_type_id : AssocItemId < ChalkIr > ) -> String {
586
586
self . associated_ty_data
587
587
. get ( & assoc_type_id)
588
588
. unwrap ( )
0 commit comments