diff options
| author | Kalle Wachsmuth <kalle.wachsmuth@gmail.com> | 2024-02-20 00:14:53 +0100 |
|---|---|---|
| committer | Kalle Wachsmuth <kalle.wachsmuth@gmail.com> | 2024-02-20 00:14:53 +0100 |
| commit | dc7a01610f2a26dd1e1dadd136b20715909d6b94 (patch) | |
| tree | d9937ba0a40912f6c2edf7971bd4dde90171cf74 /compiler/rustc_lint/src/builtin.rs | |
| parent | 3246e79513cb89ddbfc0f21cb5a877e5b321dcc5 (diff) | |
| download | rust-dc7a01610f2a26dd1e1dadd136b20715909d6b94.tar.gz rust-dc7a01610f2a26dd1e1dadd136b20715909d6b94.zip | |
trigger `unsafe_code` on `global_asm!` invocations
Diffstat (limited to 'compiler/rustc_lint/src/builtin.rs')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index faa35f51cd4..f00177fde7c 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -393,6 +393,10 @@ impl EarlyLintPass for UnsafeCode { } } + ast::ItemKind::GlobalAsm(..) => { + self.report_unsafe(cx, it.span, BuiltinUnsafe::GlobalAsm); + } + _ => {} } } |
