diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-01 14:49:58 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-01 16:07:23 +1100 |
| commit | ec10833609aa63327437aabfaedfbe8a0edcc4d9 (patch) | |
| tree | 84f9ce4b9ce574191c76321b5c65940dc03e0107 /compiler/rustc_expand/src/expand.rs | |
| parent | df247968f267d30fb8b048c21f595f2293d8ff62 (diff) | |
| download | rust-ec10833609aa63327437aabfaedfbe8a0edcc4d9.tar.gz rust-ec10833609aa63327437aabfaedfbe8a0edcc4d9.zip | |
Address review comments.
Diffstat (limited to 'compiler/rustc_expand/src/expand.rs')
| -rw-r--r-- | compiler/rustc_expand/src/expand.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index d1dd454fa73..bca846d2ec4 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -1223,9 +1223,7 @@ impl InvocationCollectorNode for P<ast::Item> { // Work around borrow checker not seeing through `P`'s deref. let (span, mut attrs) = (node.span, mem::take(&mut node.attrs)); - let ItemKind::Mod(_, ident, mod_kind) = &mut node.kind else { unreachable!() }; - let ident = *ident; - + let ItemKind::Mod(_, ident, ref mut mod_kind) = node.kind else { unreachable!() }; let ecx = &mut collector.cx; let (file_path, dir_path, dir_ownership) = match mod_kind { ModKind::Loaded(_, inline, _, _) => { |
