@@ -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:: {
@@ -97,7 +97,7 @@ pub struct Program {
97
97
pub well_known_traits : BTreeMap < WellKnownTrait , TraitId < ChalkIr > > ,
98
98
99
99
/// For each associated ty declaration `type Foo` found in a trait:
100
- pub associated_ty_data : BTreeMap < AssocTypeId < ChalkIr > , Arc < AssociatedTyDatum < ChalkIr > > > ,
100
+ pub associated_ty_data : BTreeMap < AssocItemId < ChalkIr > , Arc < AssociatedTyDatum < ChalkIr > > > ,
101
101
102
102
/// For each user-specified clause
103
103
pub custom_clauses : Vec < ProgramClause < ChalkIr > > ,
@@ -151,13 +151,13 @@ impl tls::DebugContext for Program {
151
151
152
152
fn debug_assoc_type_id (
153
153
& self ,
154
- assoc_type_id : AssocTypeId < ChalkIr > ,
154
+ assoc_type_id : AssocItemId < ChalkIr > ,
155
155
fmt : & mut fmt:: Formatter < ' _ > ,
156
156
) -> Result < ( ) , fmt:: Error > {
157
157
if let Some ( d) = self . associated_ty_data . get ( & assoc_type_id) {
158
158
write ! ( fmt, "({:?}::{})" , d. trait_id, d. name)
159
159
} else {
160
- fmt. debug_struct ( "InvalidAssocTypeId " )
160
+ fmt. debug_struct ( "InvalidAssocItemId " )
161
161
. field ( "index" , & assoc_type_id. 0 )
162
162
. finish ( )
163
163
}
@@ -204,7 +204,7 @@ impl tls::DebugContext for Program {
204
204
205
205
fn debug_projection_ty (
206
206
& self ,
207
- projection_ty : & ProjectionTy < ChalkIr > ,
207
+ projection_ty : & ProjectionTerm < ChalkIr > ,
208
208
fmt : & mut fmt:: Formatter < ' _ > ,
209
209
) -> Result < ( ) , fmt:: Error > {
210
210
let ( associated_ty_data, trait_params, other_params) = self . split_projection ( projection_ty) ;
@@ -386,7 +386,7 @@ impl RustIrDatabase<ChalkIr> for Program {
386
386
self . custom_clauses . clone ( )
387
387
}
388
388
389
- fn associated_ty_data ( & self , ty : AssocTypeId < ChalkIr > ) -> Arc < AssociatedTyDatum < ChalkIr > > {
389
+ fn associated_ty_data ( & self , ty : AssocItemId < ChalkIr > ) -> Arc < AssociatedTyDatum < ChalkIr > > {
390
390
self . associated_ty_data [ & ty] . clone ( )
391
391
}
392
392
@@ -587,7 +587,7 @@ impl RustIrDatabase<ChalkIr> for Program {
587
587
// normally acceptable, but causes the re-parse tests for the .chalk syntax
588
588
// writer to fail. This is because they use the `Eq` implementation on
589
589
// Program, which checks for name equality.
590
- fn assoc_type_name ( & self , assoc_type_id : AssocTypeId < ChalkIr > ) -> String {
590
+ fn assoc_type_name ( & self , assoc_type_id : AssocItemId < ChalkIr > ) -> String {
591
591
self . associated_ty_data
592
592
. get ( & assoc_type_id)
593
593
. unwrap ( )
0 commit comments