@@ -39,21 +39,21 @@ impl HirDisplay for Function {
3939 // Write container (trait or impl)
4040 let container_params = match container {
4141 Some ( AssocItemContainer :: Trait ( trait_) ) => {
42- let params = f. db . generic_params ( trait_. id . into ( ) ) ;
42+ let ( params, params_store ) = f. db . generic_params_and_store ( trait_. id . into ( ) ) ;
4343 if f. show_container_bounds ( ) && !params. is_empty ( ) {
4444 write_trait_header ( & trait_, f) ?;
4545 f. write_char ( '\n' ) ?;
46- has_disaplayable_predicates ( & params) . then_some ( params)
46+ has_disaplayable_predicates ( & params) . then_some ( ( params, params_store ) )
4747 } else {
4848 None
4949 }
5050 }
5151 Some ( AssocItemContainer :: Impl ( impl_) ) => {
52- let params = f. db . generic_params ( impl_. id . into ( ) ) ;
52+ let ( params, params_store ) = f. db . generic_params_and_store ( impl_. id . into ( ) ) ;
5353 if f. show_container_bounds ( ) && !params. is_empty ( ) {
5454 write_impl_header ( & impl_, f) ?;
5555 f. write_char ( '\n' ) ?;
56- has_disaplayable_predicates ( & params) . then_some ( params)
56+ has_disaplayable_predicates ( & params) . then_some ( ( params, params_store ) )
5757 } else {
5858 None
5959 }
@@ -169,7 +169,7 @@ impl HirDisplay for Function {
169169
170170 // Write where clauses
171171 let has_written_where = write_where_clause ( GenericDefId :: FunctionId ( self . id ) , f) ?;
172- if let Some ( container_params) = container_params {
172+ if let Some ( ( container_params, container_params_store ) ) = container_params {
173173 if !has_written_where {
174174 f. write_str ( "\n where" ) ?;
175175 }
@@ -178,7 +178,7 @@ impl HirDisplay for Function {
178178 AssocItemContainer :: Impl ( _) => "impl" ,
179179 } ;
180180 write ! ( f, "\n // Bounds from {container_name}:" , ) ?;
181- write_where_predicates ( & container_params, & data . store , f) ?;
181+ write_where_predicates ( & container_params, & container_params_store , f) ?;
182182 }
183183 Ok ( ( ) )
184184 }
0 commit comments