@@ -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
@@ -1102,13 +1115,13 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
11021115 "write syntax and type analysis (in JSON format) information, in \
11031116 addition to normal output") ,
11041117 flowgraph_print_loans: bool = ( false , parse_bool, [ UNTRACKED ] ,
1105- "include loan analysis data in -- unpretty flowgraph output" ) ,
1118+ "include loan analysis data in -Z unpretty flowgraph output" ) ,
11061119 flowgraph_print_moves: bool = ( false , parse_bool, [ UNTRACKED ] ,
1107- "include move analysis data in -- unpretty flowgraph output" ) ,
1120+ "include move analysis data in -Z unpretty flowgraph output" ) ,
11081121 flowgraph_print_assigns: bool = ( false , parse_bool, [ UNTRACKED ] ,
1109- "include assignment analysis data in -- unpretty flowgraph output" ) ,
1122+ "include assignment analysis data in -Z unpretty flowgraph output" ) ,
11101123 flowgraph_print_all: bool = ( false , parse_bool, [ UNTRACKED ] ,
1111- "include all dataflow analysis data in -- unpretty flowgraph output" ) ,
1124+ "include all dataflow analysis data in -Z unpretty flowgraph output" ) ,
11121125 print_region_graph: bool = ( false , parse_bool, [ UNTRACKED ] ,
11131126 "prints region inference graph. \
11141127 Use with RUST_REGION_GRAPH=help for more info") ,
@@ -1239,6 +1252,13 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
12391252 dep_info_omit_d_target: bool = ( false , parse_bool, [ TRACKED ] ,
12401253 "in dep-info output, omit targets for tracking dependencies of the dep-info files \
12411254 themselves") ,
1255+ unpretty: Option <String > = ( None , parse_unpretty, [ UNTRACKED ] ,
1256+ "Present the input source, unstable (and less-pretty) variants;
1257+ valid types are any of the types for `--pretty`, as well as:
1258+ `flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
1259+ `everybody_loops` (all function bodies replaced with `loop {}`),
1260+ `hir` (the HIR), `hir,identified`, or
1261+ `hir,typed` (HIR with types for each node)." ) ,
12421262}
12431263
12441264pub fn default_lib_output ( ) -> CrateType {
@@ -1512,14 +1532,6 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
15121532 `expanded` (crates expanded), or
15131533 `expanded,identified` (fully parenthesized, AST nodes with IDs)." ,
15141534 "TYPE" ) ,
1515- opt:: opt( "" , "unpretty" ,
1516- "Present the input source, unstable (and less-pretty) variants;
1517- valid types are any of the types for `--pretty`, as well as:
1518- `flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
1519- `everybody_loops` (all function bodies replaced with `loop {}`),
1520- `hir` (the HIR), `hir,identified`, or
1521- `hir,typed` (HIR with types for each node)." ,
1522- "TYPE" ) ,
15231535 ] ) ;
15241536 opts
15251537}
0 commit comments