I tried this code:
https://godbolt.org/z/v594PEsr7
I expected to see this happen:
Instead, this happened:
example[7a9efb3d937417e2]::drop_btree:
push r14
push rbx
sub rsp, 104
mov qword ptr [rsp + 32], 0
mov qword ptr [rsp + 64], 0
mov qword ptr [rsp + 96], 0
lea rdi, [rsp + 8]
lea rsi, [rsp + 32]
call <alloc[c00562a4ff4db933]::collections::btree::map::IntoIter<(), ()>>::dying_next
cmp qword ptr [rsp + 8], 0
je .LBB0_3
lea rbx, [rsp + 8]
lea r14, [rsp + 32]
.LBB0_2:
mov rdi, rbx
mov rsi, r14
call <alloc[c00562a4ff4db933]::collections::btree::map::IntoIter<(), ()>>::dying_next
cmp qword ptr [rsp + 8], 0
jne .LBB0_2
.LBB0_3:
add rsp, 104
pop rbx
pop r14
ret
I tried this code:
https://godbolt.org/z/v594PEsr7
I expected to see this happen:
retInstead, this happened: