@@ -39,21 +39,21 @@ impl HirDisplay for Function {
39
39
// Write container (trait or impl)
40
40
let container_params = match container {
41
41
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 ( ) ) ;
43
43
if f. show_container_bounds ( ) && !params. is_empty ( ) {
44
44
write_trait_header ( & trait_, f) ?;
45
45
f. write_char ( '\n' ) ?;
46
- has_disaplayable_predicates ( & params) . then_some ( params)
46
+ has_disaplayable_predicates ( & params) . then_some ( ( params, params_store ) )
47
47
} else {
48
48
None
49
49
}
50
50
}
51
51
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 ( ) ) ;
53
53
if f. show_container_bounds ( ) && !params. is_empty ( ) {
54
54
write_impl_header ( & impl_, f) ?;
55
55
f. write_char ( '\n' ) ?;
56
- has_disaplayable_predicates ( & params) . then_some ( params)
56
+ has_disaplayable_predicates ( & params) . then_some ( ( params, params_store ) )
57
57
} else {
58
58
None
59
59
}
@@ -169,7 +169,7 @@ impl HirDisplay for Function {
169
169
170
170
// Write where clauses
171
171
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 {
173
173
if !has_written_where {
174
174
f. write_str ( "\n where" ) ?;
175
175
}
@@ -178,7 +178,7 @@ impl HirDisplay for Function {
178
178
AssocItemContainer :: Impl ( _) => "impl" ,
179
179
} ;
180
180
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) ?;
182
182
}
183
183
Ok ( ( ) )
184
184
}
0 commit comments