Skip to content

Commit bce5688

Browse files
authored
Rollup merge of rust-lang#57598 - h-michael:unpretty-help, r=oli-obk
Add missing unpretty option help message There are some missing help messages that is printed `ructc -Zunpretty help` and receiving invalid option. related with rust-lang#16419, rust-lang#45721, rust-lang#21085, rust-lang#31916
2 parents 5272be5 + 260fb31 commit bce5688

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/librustc/session/config.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1353,10 +1353,15 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
13531353
unpretty: Option<String> = (None, parse_unpretty, [UNTRACKED],
13541354
"Present the input source, unstable (and less-pretty) variants;
13551355
valid types are any of the types for `--pretty`, as well as:
1356+
`expanded`, `expanded,identified`,
1357+
`expanded,hygiene` (with internal representations),
13561358
`flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
1359+
`flowgraph,unlabelled=<nodeid>` (unlabelled graphviz formatted flowgraph for node),
13571360
`everybody_loops` (all function bodies replaced with `loop {}`),
1358-
`hir` (the HIR), `hir,identified`, or
1359-
`hir,typed` (HIR with types for each node)."),
1361+
`hir` (the HIR), `hir,identified`,
1362+
`hir,typed` (HIR with types for each node),
1363+
`hir-tree` (dump the raw HIR),
1364+
`mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)"),
13601365
run_dsymutil: Option<bool> = (None, parse_opt_bool, [TRACKED],
13611366
"run `dsymutil` and delete intermediate object files"),
13621367
ui_testing: bool = (false, parse_bool, [UNTRACKED],

src/librustc_driver/pretty.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ pub fn parse_pretty(sess: &Session,
123123
sess.fatal(&format!("argument to `unpretty` must be one of `normal`, \
124124
`expanded`, `flowgraph[,unlabelled]=<nodeid>`, \
125125
`identified`, `expanded,identified`, `everybody_loops`, \
126-
`hir`, `hir,identified`, `hir,typed`, or `mir`; got {}",
126+
`hir`, `hir,identified`, `hir,typed`, `hir-tree`, \
127+
`mir` or `mir-cfg`; got {}",
127128
name));
128129
} else {
129130
sess.fatal(&format!("argument to `pretty` must be one of `normal`, `expanded`, \

0 commit comments

Comments
 (0)