Open
Description
Opening a new bug as requested in #90521 (comment)
I wanted to check how (a,b) = (b,a)
compares to mem::swap,
it looks like mem::swap
applies optimizations when T
is 32 bytes or bigger but destructuring_assignment
doesn't.
I tried this code:
https://godbolt.org/z/czfTv3nzW
I expected to see this happen:
Both function should generate the same (optimal) code
Instead, this happened:
mem::swap
applies optimizations while destructuring_assignment
doesn't