@@ -2577,6 +2577,7 @@ fn parse_pretty(unstable_opts: &UnstableOptions, efmt: ErrorOutputType) -> Optio
2577
2577
"hir,typed" => Hir ( PpHirMode :: Typed ) ,
2578
2578
"hir-tree" => HirTree ,
2579
2579
"thir-tree" => ThirTree ,
2580
+ "thir-flat" => ThirFlat ,
2580
2581
"mir" => Mir ,
2581
2582
"mir-cfg" => MirCFG ,
2582
2583
name => early_error (
@@ -2585,7 +2586,8 @@ fn parse_pretty(unstable_opts: &UnstableOptions, efmt: ErrorOutputType) -> Optio
2585
2586
"argument to `unpretty` must be one of `normal`, `identified`, \
2586
2587
`expanded`, `expanded,identified`, `expanded,hygiene`, \
2587
2588
`ast-tree`, `ast-tree,expanded`, `hir`, `hir,identified`, \
2588
- `hir,typed`, `hir-tree`, `thir-tree`, `mir` or `mir-cfg`; got {name}"
2589
+ `hir,typed`, `hir-tree`, `thir-tree`, `thir-flat`, `mir` or \
2590
+ `mir-cfg`; got {name}"
2589
2591
) ,
2590
2592
) ,
2591
2593
} ;
@@ -2740,6 +2742,8 @@ pub enum PpMode {
2740
2742
HirTree ,
2741
2743
/// `-Zunpretty=thir-tree`
2742
2744
ThirTree ,
2745
+ /// `-Zunpretty=`thir-flat`
2746
+ ThirFlat ,
2743
2747
/// `-Zunpretty=mir`
2744
2748
Mir ,
2745
2749
/// `-Zunpretty=mir-cfg`
@@ -2758,6 +2762,7 @@ impl PpMode {
2758
2762
| Hir ( _)
2759
2763
| HirTree
2760
2764
| ThirTree
2765
+ | ThirFlat
2761
2766
| Mir
2762
2767
| MirCFG => true ,
2763
2768
}
@@ -2767,13 +2772,13 @@ impl PpMode {
2767
2772
match * self {
2768
2773
Source ( _) | AstTree ( _) => false ,
2769
2774
2770
- Hir ( _) | HirTree | ThirTree | Mir | MirCFG => true ,
2775
+ Hir ( _) | HirTree | ThirTree | ThirFlat | Mir | MirCFG => true ,
2771
2776
}
2772
2777
}
2773
2778
2774
2779
pub fn needs_analysis ( & self ) -> bool {
2775
2780
use PpMode :: * ;
2776
- matches ! ( * self , Mir | MirCFG | ThirTree )
2781
+ matches ! ( * self , Mir | MirCFG | ThirTree | ThirFlat )
2777
2782
}
2778
2783
}
2779
2784
0 commit comments