]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/no_spurious_drop_after_call.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / mir-opt / no_spurious_drop_after_call.rs
1 // ignore-wasm32-bare compiled with panic=abort by default
2
3 // Test that after the call to `std::mem::drop` we do not generate a
4 // MIR drop of the argument. (We used to have a `DROP(_2)` in the code
5 // below, as part of bb3.)
6
7 // EMIT_MIR no_spurious_drop_after_call.main.ElaborateDrops.before.mir
8 fn main() {
9     std::mem::drop("".to_string());
10 }