diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-03-29 08:50:04 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-04-04 09:44:50 +0000 |
| commit | e3828777a6b669c33fc59f2bddde44e888d304af (patch) | |
| tree | ea3db36e58224c4e95f44dc9f1e0eddf1f8a93b5 /compiler/rustc_builtin_macros/src/global_allocator.rs | |
| parent | b08a557f80865433d39d47934904a81b8ab3d720 (diff) | |
| download | rust-e3828777a6b669c33fc59f2bddde44e888d304af.tar.gz rust-e3828777a6b669c33fc59f2bddde44e888d304af.zip | |
rust-analyzer guided tuple field to named field
Diffstat (limited to 'compiler/rustc_builtin_macros/src/global_allocator.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/global_allocator.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/global_allocator.rs b/compiler/rustc_builtin_macros/src/global_allocator.rs index f817b20daf4..f26e2572088 100644 --- a/compiler/rustc_builtin_macros/src/global_allocator.rs +++ b/compiler/rustc_builtin_macros/src/global_allocator.rs @@ -25,12 +25,12 @@ pub fn expand( // FIXME - if we get deref patterns, use them to reduce duplication here let (item, is_stmt, ty_span) = if let Annotatable::Item(item) = &item - && let ItemKind::Static(ast::Static(ty, ..)) = &item.kind + && let ItemKind::Static(ast::Static { ty, ..}) = &item.kind { (item, false, ecx.with_def_site_ctxt(ty.span)) } else if let Annotatable::Stmt(stmt) = &item && let StmtKind::Item(item) = &stmt.kind - && let ItemKind::Static(ast::Static(ty, ..)) = &item.kind + && let ItemKind::Static(ast::Static { ty, ..}) = &item.kind { (item, true, ecx.with_def_site_ctxt(ty.span)) } else { |
