@@ -11,7 +11,7 @@ use chalk_ir::{
1111use chalk_solve:: rust_ir:: {
1212 AdtDatum , AdtRepr , AdtSizeAlign , AssociatedTyDatum , AssociatedTyValue , AssociatedTyValueId ,
1313 ClosureKind , CoroutineDatum , CoroutineWitnessDatum , FnDefDatum , FnDefInputsAndOutputDatum ,
14- ImplDatum , ImplType , OpaqueTyDatum , TraitDatum , WellKnownTrait ,
14+ ImplDatum , ImplType , OpaqueTyDatum , TraitDatum , WellKnownAssocType , WellKnownTrait ,
1515} ;
1616use chalk_solve:: split:: Split ;
1717use chalk_solve:: RustIrDatabase ;
@@ -96,6 +96,9 @@ pub struct Program {
9696 /// For each trait lang item
9797 pub well_known_traits : BTreeMap < WellKnownTrait , TraitId < ChalkIr > > ,
9898
99+ /// For each assoc type lang item
100+ pub well_known_assoc_types : BTreeMap < WellKnownAssocType , AssocTypeId < ChalkIr > > ,
101+
99102 /// For each associated ty declaration `type Foo` found in a trait:
100103 pub associated_ty_data : BTreeMap < AssocTypeId < ChalkIr > , Arc < AssociatedTyDatum < ChalkIr > > > ,
101104
@@ -539,10 +542,9 @@ impl RustIrDatabase<ChalkIr> for Program {
539542
540543 fn well_known_assoc_type_id (
541544 & self ,
542- _assoc_type : chalk_solve :: rust_ir :: WellKnownAssocType ,
545+ assoc_type : WellKnownAssocType ,
543546 ) -> Option < AssocTypeId < ChalkIr > > {
544- // FIXME
545- None
547+ self . well_known_assoc_types . get ( & assoc_type) . copied ( )
546548 }
547549
548550 fn program_clauses_for_env (
0 commit comments