mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 09:47:57 +00:00
and that function only match drop_btree exactly. As the previous dealloc also passed on old code so didn't catch the regression
16 lines
372 B
Rust
16 lines
372 B
Rust
// Regression test for https://github.com/rust-lang/rust/issues/161375
|
|
// Checking that an empty BTree's drop is optimized away.
|
|
//@ compile-flags: -Copt-level=3
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
use std::collections::BTreeMap;
|
|
|
|
// CHECK-LABEL: @drop_btree(
|
|
// CHECK-NEXT: {{.*}}:
|
|
// CHECK-NEXT: ret void
|
|
#[no_mangle]
|
|
pub fn drop_btree() {
|
|
let _ = BTreeMap::<(), ()>::new();
|
|
}
|