Module rustc_mir_transform::simplify_try
source · Expand description
The general point of the optimizations provided here is to simplify something like:
match x {
Ok(x) => Ok(x),
Err(x) => Err(x)
}into just x.
Structs
Simplifies arms of form
Variant(x) => Variant(x) to just a move.Simplifies
SwitchInt(_) -> [targets],
where all the targets have the same form,
into goto -> target_first.VarField 🔒
Enums
Functions
Match on:
Match on:
Match on:
Match on
((_LOCAL as Variant).FIELD: TY).