diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-20 17:13:50 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-20 17:13:50 +0100 |
commit | 4ad2e4ce4e88c809abc7a8006d306fb038eb2d18 (patch) | |
tree | 21cc19a5b4fd27b42e09fa12642254227275e88f /crates/ra_hir/src/nameres.rs | |
parent | 526a6aba104a32eb9f0f5a65232783d5570c35d5 (diff) | |
parent | 8ac3d1f9aa892fc891b69c7d8d00d39b9371d246 (diff) |
Merge #1154
1154: Initial support for lang items (and str completion) r=flodiebold a=marcogroppo
This PR adds partial support for lang items.
For now, the only supported lang items are the ones that target an impl block.
Lang items are now resolved during type inference - this means that `str` completion now works.
Fixes #1139.
(thanks Florian Diebold for the help!)
Co-authored-by: Marco Groppo <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/nameres.rs')
-rw-r--r-- | crates/ra_hir/src/nameres.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 0eddfab12..39152360c 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs | |||
@@ -202,6 +202,10 @@ impl CrateDefMap { | |||
202 | Arc::new(def_map) | 202 | Arc::new(def_map) |
203 | } | 203 | } |
204 | 204 | ||
205 | pub(crate) fn krate(&self) -> Crate { | ||
206 | self.krate | ||
207 | } | ||
208 | |||
205 | pub(crate) fn root(&self) -> CrateModuleId { | 209 | pub(crate) fn root(&self) -> CrateModuleId { |
206 | self.root | 210 | self.root |
207 | } | 211 | } |