mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 13:07:37 +00:00
17 lines
202 B
Rust
17 lines
202 B
Rust
![]() |
// no-prefer-dynamic
|
||
|
|
||
|
#![crate_type = "rlib"]
|
||
|
|
||
|
struct Bomb;
|
||
|
|
||
|
impl Drop for Bomb {
|
||
|
fn drop(&mut self) {
|
||
|
std::process::exit(0);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub fn bar(f: fn()) {
|
||
|
let _bomb = Bomb;
|
||
|
f();
|
||
|
}
|