Function rustc_mir_transform::dest_prop::places_to_candidate_pair
source ยท fn places_to_candidate_pair<'tcx>(
a: Place<'tcx>,
b: Place<'tcx>,
body: &Body<'tcx>,
) -> Option<(Local, Local)>
Expand description
If the pair of places is being considered for merging, returns the candidate which would be merged in order to accomplish this.
The contract here is in one direction - there is a guarantee that merging the locals that are outputted by this function would result in an assignment between the inputs becoming a self-assignment. However, there is no guarantee that the returned pair is actually suitable for merging - candidate collection must still check this independently.
This output is unique for each unordered pair of input places.