rust/tests/codegen/issues/issue-103840.rs
2023-11-21 22:40:16 +01:00

10 lines
185 B
Rust

// compile-flags: -O
#![crate_type = "lib"]
pub fn foo(t: &mut Vec<usize>) {
// CHECK-NOT: __rust_dealloc
let mut taken = std::mem::take(t);
taken.pop();
*t = taken;
}