Rollup merge of #85870 - ptrojahn:mir_dump_whitespace, r=davidtwco
Allow whitespace in dump_mir filter At least on my system this is necessary to get more complex filters with spaces like in https://rustc-dev-guide.rust-lang.org/mir/debugging.html working.
This commit is contained in:
commit
7030efbb77
1 changed files with 4 additions and 1 deletions
|
@ -99,7 +99,10 @@ pub fn dump_enabled<'tcx>(tcx: TyCtxt<'tcx>, pass_name: &str, def_id: DefId) ->
|
|||
});
|
||||
filters.split('|').any(|or_filter| {
|
||||
or_filter.split('&').all(|and_filter| {
|
||||
and_filter == "all" || pass_name.contains(and_filter) || node_path.contains(and_filter)
|
||||
let and_filter_trimmed = and_filter.trim();
|
||||
and_filter_trimmed == "all"
|
||||
|| pass_name.contains(and_filter_trimmed)
|
||||
|| node_path.contains(and_filter_trimmed)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue