diff options
Diffstat (limited to 'crates/hir/src/source_analyzer.rs')
-rw-r--r-- | crates/hir/src/source_analyzer.rs | 6 |
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( |