diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-17 16:09:46 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-02-22 00:12:07 +0000 |
| commit | 6ba39f7dc709a90bcb125974964a7e464ed86ff2 (patch) | |
| tree | 68d6c9515988454516ca2373683f87d01b890c9f /compiler/rustc_lint/src/builtin.rs | |
| parent | 37060aae13d0fe771f9d3222f1c644820a9d2837 (diff) | |
| download | rust-6ba39f7dc709a90bcb125974964a7e464ed86ff2.tar.gz rust-6ba39f7dc709a90bcb125974964a7e464ed86ff2.zip | |
Make a fake body to store typeck results for global_asm
Diffstat (limited to 'compiler/rustc_lint/src/builtin.rs')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index b5f09ff346a..6c5a2dcd146 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -2909,7 +2909,13 @@ enum AsmLabelKind { impl<'tcx> LateLintPass<'tcx> for AsmLabels { fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { if let hir::Expr { - kind: hir::ExprKind::InlineAsm(hir::InlineAsm { template_strs, options, .. }), + kind: + hir::ExprKind::InlineAsm(hir::InlineAsm { + asm_macro: AsmMacro::Asm | AsmMacro::NakedAsm, + template_strs, + options, + .. + }), .. } = expr { |
