@@ -10,6 +10,7 @@ use chalk_ir::{
1010} ;
1111use chalk_solve:: rust_ir:: {
1212 AdtDatum , AdtRepr , AdtSizeAlign , AssociatedConstValue , AssociatedConstValueId ,
13+ AssociatedConstDatum ,
1314 AssociatedTyDatum , AssociatedTyValue , AssociatedTyValueId , ClosureKind , FnDefDatum ,
1415 FnDefInputsAndOutputDatum , GeneratorDatum , GeneratorWitnessDatum , ImplDatum , ImplType ,
1516 OpaqueTyDatum , TraitDatum , WellKnownTrait ,
@@ -104,6 +105,9 @@ pub struct Program {
104105 /// For each associated ty declaration `type Foo` found in a trait:
105106 pub associated_ty_data : BTreeMap < AssocItemId < ChalkIr > , Arc < AssociatedTyDatum < ChalkIr > > > ,
106107
108+ /// For each associated const declaration `const Foo` found in a trait:
109+ pub associated_const_data : BTreeMap < AssocItemId < ChalkIr > , Arc < AssociatedConstDatum < ChalkIr > > > ,
110+
107111 /// For each user-specified clause
108112 pub custom_clauses : Vec < ProgramClause < ChalkIr > > ,
109113
@@ -395,6 +399,10 @@ impl RustIrDatabase<ChalkIr> for Program {
395399 self . associated_ty_data [ & ty] . clone ( )
396400 }
397401
402+ fn associated_const_data ( & self , ct : AssocItemId < ChalkIr > ) -> Arc < AssociatedConstDatum < ChalkIr > > {
403+ self . associated_const_data [ & ct] . clone ( )
404+ }
405+
398406 fn trait_datum ( & self , id : TraitId < ChalkIr > ) -> Arc < TraitDatum < ChalkIr > > {
399407 self . trait_data [ & id] . clone ( )
400408 }
0 commit comments