pub fn dump_mir<'tcx, F>(
tcx: TyCtxt<'tcx>,
pass_num: Option<&dyn Display>,
pass_name: &str,
disambiguator: &dyn Display,
body: &Body<'tcx>,
extra_data: F
)where
F: FnMut(PassWhere, &mut dyn Write) -> Result<()>,
Expand description
If the session is properly configured, dumps a human-readable representation of the mir into:
rustc.node<node_id>.<pass_num>.<pass_name>.<disambiguator>
Output from this function is controlled by passing -Z dump-mir=<filter>
,
where <filter>
takes the following forms:
all
– dump MIR for all fns, all passes, all everything- a filter defined by a set of substrings combined with
&
and|
(&
has higher precedence). At least one of the|
-separated groups must match; an|
-separated group matches if all of its&
-separated substrings are matched.
Example:
nll
== match ifnll
appears in the namefoo & nll
== match iffoo
andnll
both appear in the namefoo & nll | typeck
== match iffoo
andnll
both appear in the name ortypeck
appears in the name.foo & nll | bar & typeck
== match iffoo
andnll
both appear in the name ortypeck
andbar
both appear in the name.