1
Fork 0

Rollup merge of #120609 - petrochenkov:nousestem2, r=compiler-errors

hir: Stop keeping prefixes for most of `use` list stems

And make sure all other imports have non-empty resolution lists.

Addresses one of FIXMEs in https://github.com/rust-lang/rust/pull/120206.
This commit is contained in:
Matthias Krüger 2024-02-06 19:40:08 +01:00 committed by GitHub
commit 3731acc714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 9 deletions

View file

@ -196,6 +196,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| {