hir: Stop keeping prefixes for most of use list stems

And make sure all other imports have non-empty resolution lists.
This commit is contained in:
Vadim Petrochenkov
2024-01-30 22:03:16 +03:00
parent bf3c6c5bed
commit f5d6eb30a8
3 changed files with 23 additions and 9 deletions

View File

@@ -156,6 +156,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
p: &Path,
param_mode: ParamMode,
) -> &'hir hir::UsePath<'hir> {
assert!((1..=3).contains(&res.len()));
self.arena.alloc(hir::UsePath {
res,
segments: self.arena.alloc_from_iter(p.segments.iter().map(|segment| {