mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Auto merge of #106272 - clubby789:codegen-test-103840, r=nikic
Add codegen test for issue 103840 Closes #103840
This commit is contained in:
commit
23b1cc197a
9
src/test/codegen/issue-103840.rs
Normal file
9
src/test/codegen/issue-103840.rs
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user