File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ pub(crate) fn goto_implementation(
52
52
hir:: ModuleDef :: Function ( f) => {
53
53
let assoc = f. as_assoc_item ( sema. db ) ?;
54
54
let name = assoc. name ( sema. db ) ?;
55
- let trait_ = assoc. containing_trait ( sema. db ) ?;
55
+ let trait_ = assoc. containing_trait_or_trait_impl ( sema. db ) ?;
56
56
impls_for_trait_item ( & sema, trait_, name)
57
57
}
58
58
hir:: ModuleDef :: Const ( c) => {
59
59
let assoc = c. as_assoc_item ( sema. db ) ?;
60
60
let name = assoc. name ( sema. db ) ?;
61
- let trait_ = assoc. containing_trait ( sema. db ) ?;
61
+ let trait_ = assoc. containing_trait_or_trait_impl ( sema. db ) ?;
62
62
impls_for_trait_item ( & sema, trait_, name)
63
63
}
64
64
_ => return None ,
Original file line number Diff line number Diff line change @@ -111,7 +111,10 @@ impl<'a> RenderContext<'a> {
111
111
hir:: AssocItem :: TypeAlias ( it) => self . is_deprecated ( it) ,
112
112
} ;
113
113
is_assoc_deprecated
114
- || assoc. containing_trait ( db) . map ( |trait_| self . is_deprecated ( trait_) ) . unwrap_or ( false )
114
+ || assoc
115
+ . containing_trait_or_trait_impl ( db)
116
+ . map ( |trait_| self . is_deprecated ( trait_) )
117
+ . unwrap_or ( false )
115
118
}
116
119
117
120
fn docs ( & self , node : impl HasAttrs ) -> Option < hir:: Documentation > {
You can’t perform that action at this time.
0 commit comments