From d0d1a202d4a4c56e593611aa34ef2e39255d16d2 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Wed, 25 Sep 2019 20:01:02 +0200 Subject: Fix retrieval of the Fn traits I used the wrong query, so it only used the lang items from the respective crate... --- crates/ra_hir/src/ty/traits/chalk.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/ty/traits/chalk.rs') diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs index d83706f86..538b4d3ec 100644 --- a/crates/ra_hir/src/ty/traits/chalk.rs +++ b/crates/ra_hir/src/ty/traits/chalk.rs @@ -765,10 +765,9 @@ fn closure_fn_trait_impl_datum( } fn get_fn_trait(db: &impl HirDatabase, krate: Crate, fn_trait: super::FnTrait) -> Option { - let lang_items = db.lang_items(krate); - let target = lang_items.target(fn_trait.lang_item_name())?; + let target = db.lang_item(krate, fn_trait.lang_item_name().into())?; match target { - crate::lang_item::LangItemTarget::Trait(t) => Some(*t), + crate::lang_item::LangItemTarget::Trait(t) => Some(t), _ => None, } } -- cgit v1.2.3