Skip to content

Commit

Permalink
Rollup merge of rust-lang#57598 - h-michael:unpretty-help, r=oli-obk
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Centril committed Jan 15, 2019
2 parents 3de3aad + 260fb31 commit c5dea61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1353,10 +1353,15 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
unpretty: Option<String> = (None, parse_unpretty, [UNTRACKED],
"Present the input source, unstable (and less-pretty) variants;
valid types are any of the types for `--pretty`, as well as:
`expanded`, `expanded,identified`,
`expanded,hygiene` (with internal representations),
`flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
`flowgraph,unlabelled=<nodeid>` (unlabelled graphviz formatted flowgraph for node),
`everybody_loops` (all function bodies replaced with `loop {}`),
`hir` (the HIR), `hir,identified`, or
`hir,typed` (HIR with types for each node)."),
`hir` (the HIR), `hir,identified`,
`hir,typed` (HIR with types for each node),
`hir-tree` (dump the raw HIR),
`mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)"),
run_dsymutil: Option<bool> = (None, parse_opt_bool, [TRACKED],
"run `dsymutil` and delete intermediate object files"),
ui_testing: bool = (false, parse_bool, [UNTRACKED],
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_driver/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ pub fn parse_pretty(sess: &Session,
sess.fatal(&format!("argument to `unpretty` must be one of `normal`, \
`expanded`, `flowgraph[,unlabelled]=<nodeid>`, \
`identified`, `expanded,identified`, `everybody_loops`, \
`hir`, `hir,identified`, `hir,typed`, or `mir`; got {}",
`hir`, `hir,identified`, `hir,typed`, `hir-tree`, \
`mir` or `mir-cfg`; got {}",
name));
} else {
sess.fatal(&format!("argument to `pretty` must be one of `normal`, `expanded`, \
Expand Down

0 comments on commit c5dea61

Please sign in to comment.