From 26086faab2dab6baeaa050f73a7f64b83ead6807 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Thu, 3 Sep 2020 20:09:36 +1200 Subject: Change Option::Some bug to a fixme note IMO this is too much work to be worth fixing at the moment. --- crates/hir/src/code_model.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/hir') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 0b24f247c..231ec0004 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -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 { match self.as_assoc_item(db).map(|assoc| assoc.container(db)) { Some(AssocItemContainer::Trait(t)) => Some(t.into()), -- cgit v1.2.3