previous thir unpretty output through thir-flat
This commit is contained in:
parent
3bce66f786
commit
9438126fd1
5 changed files with 38 additions and 3 deletions
|
@ -2577,6 +2577,7 @@ fn parse_pretty(unstable_opts: &UnstableOptions, efmt: ErrorOutputType) -> Optio
|
|||
"hir,typed" => Hir(PpHirMode::Typed),
|
||||
"hir-tree" => HirTree,
|
||||
"thir-tree" => ThirTree,
|
||||
"thir-flat" => ThirFlat,
|
||||
"mir" => Mir,
|
||||
"mir-cfg" => MirCFG,
|
||||
name => early_error(
|
||||
|
@ -2585,7 +2586,8 @@ fn parse_pretty(unstable_opts: &UnstableOptions, efmt: ErrorOutputType) -> Optio
|
|||
"argument to `unpretty` must be one of `normal`, `identified`, \
|
||||
`expanded`, `expanded,identified`, `expanded,hygiene`, \
|
||||
`ast-tree`, `ast-tree,expanded`, `hir`, `hir,identified`, \
|
||||
`hir,typed`, `hir-tree`, `thir-tree`, `mir` or `mir-cfg`; got {name}"
|
||||
`hir,typed`, `hir-tree`, `thir-tree`, `thir-flat`, `mir` or \
|
||||
`mir-cfg`; got {name}"
|
||||
),
|
||||
),
|
||||
};
|
||||
|
@ -2740,6 +2742,8 @@ pub enum PpMode {
|
|||
HirTree,
|
||||
/// `-Zunpretty=thir-tree`
|
||||
ThirTree,
|
||||
/// `-Zunpretty=`thir-flat`
|
||||
ThirFlat,
|
||||
/// `-Zunpretty=mir`
|
||||
Mir,
|
||||
/// `-Zunpretty=mir-cfg`
|
||||
|
@ -2758,6 +2762,7 @@ impl PpMode {
|
|||
| Hir(_)
|
||||
| HirTree
|
||||
| ThirTree
|
||||
| ThirFlat
|
||||
| Mir
|
||||
| MirCFG => true,
|
||||
}
|
||||
|
@ -2767,13 +2772,13 @@ impl PpMode {
|
|||
match *self {
|
||||
Source(_) | AstTree(_) => false,
|
||||
|
||||
Hir(_) | HirTree | ThirTree | Mir | MirCFG => true,
|
||||
Hir(_) | HirTree | ThirTree | ThirFlat | Mir | MirCFG => true,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn needs_analysis(&self) -> bool {
|
||||
use PpMode::*;
|
||||
matches!(*self, Mir | MirCFG | ThirTree)
|
||||
matches!(*self, Mir | MirCFG | ThirTree | ThirFlat)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue