rust-analyzer version: rust-analyzer version: 0.4.2532-standalone [/home/usamoi/.vscode/extensions/rust-lang.rust-analyzer-0.4.2532-linux-x64/server/rust-analyzer]
rustc version: rustc 1.88.0 (6b00bc388 2025-06-23)
editor or extension: VSCode
code snippet to reproduce:
#[unsafe(no_mangle)]
#[unsafe(naked)]
extern "C" fn hack() -> u64 {
core::arch::naked_asm!("mov eax, 998244353", "ret");
}
fn main() {
hack();
}
Rustc accepts the code without warnings, while rust-analyzer complains use of inline assembly is unsafe and requires an unsafe function or block on core::arch::naked_asm macro call.
cc rust-lang/rust#139753
rust-analyzer version: rust-analyzer version: 0.4.2532-standalone [/home/usamoi/.vscode/extensions/rust-lang.rust-analyzer-0.4.2532-linux-x64/server/rust-analyzer]
rustc version: rustc 1.88.0 (6b00bc388 2025-06-23)
editor or extension: VSCode
code snippet to reproduce:
Rustc accepts the code without warnings, while rust-analyzer complains
use of inline assembly is unsafe and requires an unsafe function or blockoncore::arch::naked_asmmacro call.cc rust-lang/rust#139753