rust
rust copied to clipboard
deny(unsafe_code) should prevent `global_asm!` usage.
Similar to how deny(unsafe_code) prevents #[no_mangle] from being used, it should also prevent global_asm! blocks from being allowed. If misused, they can do any number of strange and horrible thing simply by being within the crate.
@rustbot claim
@rustbot label +C-bug +T-compiler
I suppose it's probably too late to actually make it require unsafe {}?
that isn't even currently possible from a syntax perspective because unsafe blocks only work as expressions, you can't just put them around a top level item. It would take a whole RFC thing, even separately from global_asm already being stable.