rust/tests/codegen/issues/issue-103840.rs

11 lines
211 B
Rust
Raw Normal View History

2022-12-29 11:33:04 -06:00
// compile-flags: -O
2023-04-05 14:15:32 -05:00
// min-llvm-version: 16.0
2022-12-29 11:33:04 -06:00
#![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;
}