rustc_mir_transform::nrvo - Rust (original) (raw)

rustc_mir_transform

Module nrvo

Source

Expand description

See the docs for RenameReturnPlace.

Structs§

IsReturnPlaceRead 🔒

RenameReturnPlace 🔒

This pass looks for MIR that always copies the same local into the return place and eliminates the copy by renaming all uses of that local to _0.

RenameToReturnPlace 🔒

Functions§

as_local_assigned_to_return_place 🔒

find_local_assigned_to_return_place 🔒

local_eligible_for_nrvo 🔒

MIR that is eligible for the NRVO must fulfill two conditions: