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:
commit
3731acc714
3 changed files with 23 additions and 9 deletions
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue