Skip to content

Commit 0377945

Browse files
committed
add comment for lower_use_tree
Signed-off-by: SparrowLii <[email protected]>
1 parent c6f0a7c commit 0377945

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+3
-0
lines changed

compiler/rustc_ast_lowering/src/item.rs

+3
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
559559
self.with_hir_id_owner(id, |this| {
560560
let mut ident = *ident;
561561

562+
// `prefix` is lowered multiple times, but in different HIR owners.
563+
// So each segment gets renewed `HirId` with the same
564+
// `ItemLocalId` and the new owner. (See `lower_node_id`)
562565
let kind =
563566
this.lower_use_tree(use_tree, &prefix, id, vis_span, &mut ident, attrs);
564567
if let Some(attrs) = attrs {

0 commit comments

Comments
 (0)