diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-03 21:34:50 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-03 21:34:50 +0000 |
commit | 4fd742d6bc23e2f61d0980e15234f09d7e715b76 (patch) | |
tree | c37d38f9313f54ea71580f6bd005f554388a57ab /crates/ra_hir/src/source_binder.rs | |
parent | f9f1effd011b906903891c09f1cb6b2a42f73e95 (diff) | |
parent | 8922a44395482896fec0c0a47a7fac4612112d45 (diff) |
Merge #2163
2163: Move CrateDefMap to hir_def r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index a4ca59bba..66cb4b357 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -253,8 +253,11 @@ impl SourceAnalyzer { | |||
253 | Some(res) | 253 | Some(res) |
254 | }); | 254 | }); |
255 | 255 | ||
256 | let items = | 256 | let items = self |
257 | self.resolver.resolve_module_path(db, &path).take_types().map(PathResolution::Def); | 257 | .resolver |
258 | .resolve_module_path(db, &path) | ||
259 | .take_types() | ||
260 | .map(|it| PathResolution::Def(it.into())); | ||
258 | types.or(values).or(items).or_else(|| { | 261 | types.or(values).or(items).or_else(|| { |
259 | self.resolver.resolve_path_as_macro(db, &path).map(|def| PathResolution::Macro(def)) | 262 | self.resolver.resolve_path_as_macro(db, &path).map(|def| PathResolution::Macro(def)) |
260 | }) | 263 | }) |