1
Fork 0

adjust smart_resolve_partial_mod_path_errors

This commit is contained in:
yukang 2023-07-07 10:19:30 +08:00
parent 9763472e2b
commit 37b40e592a
5 changed files with 48 additions and 2 deletions

View file

@ -335,8 +335,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
following_seg: Option<&Segment>,
) -> Vec<ImportSuggestion> {
if let Some(segment) = prefix_path.last() &&
let Some(following_seg) = following_seg &&
prefix_path.len() == 1
let Some(following_seg) = following_seg
{
let candidates = self.r.lookup_import_candidates(
segment.ident,