aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-05-26 20:09:27 +0100
committerLukas Wirth <[email protected]>2021-05-26 20:09:27 +0100
commit26e784a575c760087bdb321932e823ad27046024 (patch)
treed63bfa5a27928f55828c7c38b669e2105bb9baf9 /crates/hir/src
parentbb1c7fc0cfe24a8477d943faa932992b9cd48957 (diff)
simplify
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/source_analyzer.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs
index 3f940124c..37a050415 100644
--- a/crates/hir/src/source_analyzer.rs
+++ b/crates/hir/src/source_analyzer.rs
@@ -308,7 +308,11 @@ impl SourceAnalyzer {
308 } 308 }
309 } 309 }
310 310
311 resolve_hir_path_(db, &self.resolver, &hir_path, prefer_value_ns) 311 if parent().map_or(false, |it| ast::Visibility::can_cast(it.kind())) {
312 resolve_hir_path_qualifier(db, &self.resolver, &hir_path)
313 } else {
314 resolve_hir_path_(db, &self.resolver, &hir_path, prefer_value_ns)
315 }
312 } 316 }
313 317
314 pub(crate) fn record_literal_missing_fields( 318 pub(crate) fn record_literal_missing_fields(