mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 21:47:04 +00:00
24 lines
362 B
Rust
24 lines
362 B
Rust
//@ only-x86_64
|
|
//@ needs-asm-support
|
|
|
|
#![deny(unreachable_code)]
|
|
#![feature(asm_goto)]
|
|
|
|
use std::arch::asm;
|
|
|
|
fn goto_fallthough() {
|
|
unsafe {
|
|
asm!(
|
|
"/* {} */",
|
|
label {
|
|
core::hint::unreachable_unchecked();
|
|
//~^ ERROR [E0133]
|
|
}
|
|
)
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
goto_fallthough();
|
|
}
|