diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-25 19:14:35 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-25 19:14:35 +0100 |
commit | 5704485063bad82e651c8e68f4fa2d333bfdf152 (patch) | |
tree | b0928748d21ca45547e53701c6fc4d6d93a39c9a /crates/ra_hir/src/ty/traits | |
parent | a452e50e0e89390b8a055f0c7c64100e9872edac (diff) | |
parent | d0d1a202d4a4c56e593611aa34ef2e39255d16d2 (diff) |
Merge #1913
1913: Fix retrieval of the Fn traits r=flodiebold a=flodiebold
I used the wrong query, so it only used the lang items from the respective
crate...
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/traits')
-rw-r--r-- | crates/ra_hir/src/ty/traits/chalk.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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( | |||
765 | } | 765 | } |
766 | 766 | ||
767 | fn get_fn_trait(db: &impl HirDatabase, krate: Crate, fn_trait: super::FnTrait) -> Option<Trait> { | 767 | fn get_fn_trait(db: &impl HirDatabase, krate: Crate, fn_trait: super::FnTrait) -> Option<Trait> { |
768 | let lang_items = db.lang_items(krate); | 768 | let target = db.lang_item(krate, fn_trait.lang_item_name().into())?; |
769 | let target = lang_items.target(fn_trait.lang_item_name())?; | ||
770 | match target { | 769 | match target { |
771 | crate::lang_item::LangItemTarget::Trait(t) => Some(*t), | 770 | crate::lang_item::LangItemTarget::Trait(t) => Some(t), |
772 | _ => None, | 771 | _ => None, |
773 | } | 772 | } |
774 | } | 773 | } |