rustc_ast_lowering: Stop lowering imports into multiple items

Lower them into a single item with multiple resolutions instead.
This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
This commit is contained in:
Vadim Petrochenkov 2022-12-01 18:51:20 +03:00
parent c7e4abd444
commit 46f0b38eb5

View File

@ -490,7 +490,7 @@ impl UseTree {
);
result.path.push(UseSegment { kind, version });
}
UseTreeKind::Simple(ref rename, ..) => {
UseTreeKind::Simple(ref rename) => {
// If the path has leading double colons and is composed of only 2 segments, then we
// bypass the call to path_to_imported_ident which would get only the ident and
// lose the path root, e.g., `that` in `::that`.