-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger unsafe_code
lint on invocations of global_asm
#121318
Trigger unsafe_code
lint on invocations of global_asm
#121318
Conversation
rustbot has assigned @michaelwoerister. Use r? to explicitly pick a reviewer |
|
makes sense |
@@ -9,8 +9,6 @@ error[E0472]: inline assembly is unsupported on this target | |||
| | |||
LL | global_asm!(""); | |||
| ^^^^^^^^^^^^^^^ | |||
| | |||
= note: this error originates in the macro `global_asm` (in Nightly builds, run with -Z macro-backtrace for more info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice diagnostic improvement here from the span change 👍
Rollup of 8 pull requests Successful merges: - rust-lang#121167 (resolve: Scale back unloading of speculatively loaded crates) - rust-lang#121196 (Always inline check in `assert_unsafe_precondition` with cfg(debug_assertions)) - rust-lang#121241 (Implement `NonZero` traits generically.) - rust-lang#121278 (Remove the "codegen" profile from bootstrap) - rust-lang#121286 (Rename `ConstPropLint` to `KnownPanicsLint`) - rust-lang#121291 (target: Revert default to the medium code model on LoongArch targets) - rust-lang#121302 (Remove `RefMutL` hack in `proc_macro::bridge`) - rust-lang#121318 (Trigger `unsafe_code` lint on invocations of `global_asm`) Failed merges: - rust-lang#121206 (Top level error handling) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121318 - kadiwa4:no_assembly_in_supposedly_safe_code, r=Nilstrieb Trigger `unsafe_code` lint on invocations of `global_asm` `unsafe_code` already warns about things that don't involve the `unsafe` keyword, e.g. `#[no_mangle]`. This makes it warn on `core::arch::global_asm` too. Fixes rust-lang#103078
unsafe_code
already warns about things that don't involve theunsafe
keyword, e.g.#[no_mangle]
. This makes it warn oncore::arch::global_asm
too.Fixes #103078