From db4a1fcab4610db2ab31d2048ab49fbcbcfce1cc Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 11 Jun 2021 19:55:24 +0200 Subject: Replace some AssocItem::containing_trait calls trait_or_trait_impl --- crates/ide/src/goto_implementation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/goto_implementation.rs b/crates/ide/src/goto_implementation.rs index 43356a94e..95fd39850 100644 --- a/crates/ide/src/goto_implementation.rs +++ b/crates/ide/src/goto_implementation.rs @@ -52,13 +52,13 @@ pub(crate) fn goto_implementation( hir::ModuleDef::Function(f) => { let assoc = f.as_assoc_item(sema.db)?; let name = assoc.name(sema.db)?; - let trait_ = assoc.containing_trait(sema.db)?; + let trait_ = assoc.containing_trait_or_trait_impl(sema.db)?; impls_for_trait_item(&sema, trait_, name) } hir::ModuleDef::Const(c) => { let assoc = c.as_assoc_item(sema.db)?; let name = assoc.name(sema.db)?; - let trait_ = assoc.containing_trait(sema.db)?; + let trait_ = assoc.containing_trait_or_trait_impl(sema.db)?; impls_for_trait_item(&sema, trait_, name) } _ => return None, -- cgit v1.2.3