@@ -778,6 +778,8 @@ macro_rules! options {
778778 Some ( :: rustc_back:: LinkerFlavor :: one_of( ) ) ;
779779 pub const parse_optimization_fuel: Option <& ' static str > =
780780 Some ( "crate=integer" ) ;
781+ pub const parse_unpretty: Option <& ' static str > =
782+ Some ( "`string` or `string=string`" ) ;
781783 }
782784
783785 #[ allow( dead_code) ]
@@ -965,6 +967,17 @@ macro_rules! options {
965967 }
966968 }
967969 }
970+
971+ fn parse_unpretty( slot: & mut Option <String >, v: Option <& str >) -> bool {
972+ match v {
973+ None => false ,
974+ Some ( s) if s. split( '=' ) . count( ) <= 2 => {
975+ * slot = Some ( s. to_string( ) ) ;
976+ true
977+ }
978+ _ => false ,
979+ }
980+ }
968981 }
969982) }
970983
@@ -1104,13 +1117,13 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
11041117 "write syntax and type analysis (in JSON format) information, in \
11051118 addition to normal output") ,
11061119 flowgraph_print_loans: bool = ( false , parse_bool, [ UNTRACKED ] ,
1107- "include loan analysis data in -- unpretty flowgraph output" ) ,
1120+ "include loan analysis data in -Z unpretty flowgraph output" ) ,
11081121 flowgraph_print_moves: bool = ( false , parse_bool, [ UNTRACKED ] ,
1109- "include move analysis data in -- unpretty flowgraph output" ) ,
1122+ "include move analysis data in -Z unpretty flowgraph output" ) ,
11101123 flowgraph_print_assigns: bool = ( false , parse_bool, [ UNTRACKED ] ,
1111- "include assignment analysis data in -- unpretty flowgraph output" ) ,
1124+ "include assignment analysis data in -Z unpretty flowgraph output" ) ,
11121125 flowgraph_print_all: bool = ( false , parse_bool, [ UNTRACKED ] ,
1113- "include all dataflow analysis data in -- unpretty flowgraph output" ) ,
1126+ "include all dataflow analysis data in -Z unpretty flowgraph output" ) ,
11141127 print_region_graph: bool = ( false , parse_bool, [ UNTRACKED ] ,
11151128 "prints region inference graph. \
11161129 Use with RUST_REGION_GRAPH=help for more info") ,
@@ -1241,6 +1254,13 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
12411254 dep_info_omit_d_target: bool = ( false , parse_bool, [ TRACKED ] ,
12421255 "in dep-info output, omit targets for tracking dependencies of the dep-info files \
12431256 themselves") ,
1257+ unpretty: Option <String > = ( None , parse_unpretty, [ UNTRACKED ] ,
1258+ "Present the input source, unstable (and less-pretty) variants;
1259+ valid types are any of the types for `--pretty`, as well as:
1260+ `flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
1261+ `everybody_loops` (all function bodies replaced with `loop {}`),
1262+ `hir` (the HIR), `hir,identified`, or
1263+ `hir,typed` (HIR with types for each node)." ) ,
12441264}
12451265
12461266pub fn default_lib_output ( ) -> CrateType {
@@ -1514,14 +1534,6 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
15141534 `expanded` (crates expanded), or
15151535 `expanded,identified` (fully parenthesized, AST nodes with IDs)." ,
15161536 "TYPE" ) ,
1517- opt:: opt( "" , "unpretty" ,
1518- "Present the input source, unstable (and less-pretty) variants;
1519- valid types are any of the types for `--pretty`, as well as:
1520- `flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
1521- `everybody_loops` (all function bodies replaced with `loop {}`),
1522- `hir` (the HIR), `hir,identified`, or
1523- `hir,typed` (HIR with types for each node)." ,
1524- "TYPE" ) ,
15251537 ] ) ;
15261538 opts
15271539}
0 commit comments