Change Option::Some bug to a fixme note

IMO this is too much work to be worth fixing at the moment.
This commit is contained in:
Zac Pullar-Strecker 2020-09-03 20:09:36 +12:00
parent c648884397
commit 26086faab2
2 changed files with 4 additions and 3 deletions

View file

@ -779,6 +779,7 @@ impl Function {
db.function_data(self.id).has_body
}
/// If this function is a method, the trait or type where it is declared.
pub fn method_owner(self, db: &dyn HirDatabase) -> Option<MethodOwner> {
match self.as_assoc_item(db).map(|assoc| assoc.container(db)) {
Some(AssocItemContainer::Trait(t)) => Some(t.into()),