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/lang_item.rs | |
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/lang_item.rs')
-rw-r--r-- | crates/ra_hir/src/lang_item.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/lang_item.rs b/crates/ra_hir/src/lang_item.rs index e3b71cec3..bcce314d8 100644 --- a/crates/ra_hir/src/lang_item.rs +++ b/crates/ra_hir/src/lang_item.rs | |||
@@ -42,7 +42,7 @@ impl LangItems { | |||
42 | } | 42 | } |
43 | 43 | ||
44 | /// Salsa query. This will look for lang items in a specific crate. | 44 | /// Salsa query. This will look for lang items in a specific crate. |
45 | pub(crate) fn lang_items_query( | 45 | pub(crate) fn crate_lang_items_query( |
46 | db: &(impl DefDatabase + AstDatabase), | 46 | db: &(impl DefDatabase + AstDatabase), |
47 | krate: Crate, | 47 | krate: Crate, |
48 | ) -> Arc<LangItems> { | 48 | ) -> Arc<LangItems> { |
@@ -75,7 +75,7 @@ impl LangItems { | |||
75 | start_crate: Crate, | 75 | start_crate: Crate, |
76 | item: SmolStr, | 76 | item: SmolStr, |
77 | ) -> Option<LangItemTarget> { | 77 | ) -> Option<LangItemTarget> { |
78 | let lang_items = db.lang_items(start_crate); | 78 | let lang_items = db.crate_lang_items(start_crate); |
79 | let start_crate_target = lang_items.items.get(&item); | 79 | let start_crate_target = lang_items.items.get(&item); |
80 | if let Some(target) = start_crate_target { | 80 | if let Some(target) = start_crate_target { |
81 | Some(*target) | 81 | Some(*target) |