mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Address nits
This commit is contained in:
parent
699bf7dc59
commit
4534188d4b
@ -78,7 +78,7 @@ pub fn run_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, passes: &[&dyn
|
|||||||
|
|
||||||
let validate = tcx.sess.opts.debugging_opts.validate_mir;
|
let validate = tcx.sess.opts.debugging_opts.validate_mir;
|
||||||
let overridden_passes = &tcx.sess.opts.debugging_opts.mir_enable_passes;
|
let overridden_passes = &tcx.sess.opts.debugging_opts.mir_enable_passes;
|
||||||
trace!("Overridden: {:?}", overridden_passes);
|
trace!(?overridden_passes);
|
||||||
|
|
||||||
if validate {
|
if validate {
|
||||||
validate_body(tcx, body, format!("start of phase transition from {:?}", start_phase));
|
validate_body(tcx, body, format!("start of phase transition from {:?}", start_phase));
|
||||||
@ -89,9 +89,9 @@ pub fn run_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, passes: &[&dyn
|
|||||||
|
|
||||||
if let Some((_, polarity)) = overridden_passes.iter().rev().find(|(s, _)| s == &*name) {
|
if let Some((_, polarity)) = overridden_passes.iter().rev().find(|(s, _)| s == &*name) {
|
||||||
trace!(
|
trace!(
|
||||||
"{} {} as requested by flag",
|
pass = %name,
|
||||||
|
"{} as requested by flag",
|
||||||
if *polarity { "Running" } else { "Not running" },
|
if *polarity { "Running" } else { "Not running" },
|
||||||
name
|
|
||||||
);
|
);
|
||||||
if !polarity {
|
if !polarity {
|
||||||
continue;
|
continue;
|
||||||
|
@ -536,11 +536,8 @@ mod parse {
|
|||||||
match v {
|
match v {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
for s in s.split(",") {
|
for s in s.split(",") {
|
||||||
match s.chars().next() {
|
let Some(pass_name) = s.strip_prefix(&['+', '-'][..]) else { return false };
|
||||||
Some('+') => slot.push((s[1..].to_string(), true)),
|
slot.push((pass_name.to_string(), &s[..1] == "+"));
|
||||||
Some('-') => slot.push((s[1..].to_string(), false)),
|
|
||||||
_ => return false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user