mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
MIR move elimination [2/6]: TailCopyToMove Depends on rust-lang/rust#163335 This PR implements a pre-pass for the `MoveElimination` pass from https://github.com/rust-lang/rfcs/pull/3943. `TailCopyToMove` turns `Copy` into `Move` just before a `Return` terminator. This is valid even for places that have been borrowed because the `Return` will invalidate borrows anyway. This is necessary to allow the source of the copy to be unified with the return place. r? tmiasko