make -Z mir-include-spans
a dedicated enum
We want to allow setting this on the CLI, override it only in MIR passes, and disable it altogether in mir-opt tests. The default value is "only for NLL MIR dumps", which is considered off for all intents and purposes, except for `rustc_borrowck` when an NLL MIR dump is requested.
This commit is contained in:
parent
c646b46b52
commit
e0bb1c7291
4 changed files with 44 additions and 7 deletions
|
@ -54,7 +54,7 @@ pub struct PrettyPrintMirOptions {
|
|||
impl PrettyPrintMirOptions {
|
||||
/// Create the default set of MIR pretty-printing options from the CLI flags.
|
||||
pub fn from_cli(tcx: TyCtxt<'_>) -> Self {
|
||||
Self { include_extra_comments: tcx.sess.opts.unstable_opts.mir_include_spans }
|
||||
Self { include_extra_comments: tcx.sess.opts.unstable_opts.mir_include_spans.is_enabled() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue