Auto merge of #106272 - clubby789:codegen-test-103840, r=nikic

Add codegen test for issue 103840

Closes #103840
This commit is contained in:
bors 2023-01-02 17:18:58 +00:00
commit 23b1cc197a

View File

@ -0,0 +1,9 @@
// 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;
}