This commit is contained in:
Lukas Wirth 2021-05-26 21:09:27 +02:00
parent bb1c7fc0cf
commit 26e784a575
4 changed files with 44 additions and 68 deletions

View file

@ -308,7 +308,11 @@ impl SourceAnalyzer {
}
}
resolve_hir_path_(db, &self.resolver, &hir_path, prefer_value_ns)
if parent().map_or(false, |it| ast::Visibility::can_cast(it.kind())) {
resolve_hir_path_qualifier(db, &self.resolver, &hir_path)
} else {
resolve_hir_path_(db, &self.resolver, &hir_path, prefer_value_ns)
}
}
pub(crate) fn record_literal_missing_fields(