Skip to content

Commit 253c448

Browse files
authored
Rollup merge of #56597 - vext01:dump-mir-usage, r=wesleywiser
Improve the usage message for `-Z dump-mir`. Ouput now looks like this: ``` $ rustc -Z help ... -Z arg-align-attributes -- emit align metadata for reference arguments -Z dump-mir=val -- dump MIR state to file. `val` is used to select which passes and functions to dump. For example: `all` matches all passes and functions, `foo` matches all passes for functions whose name contains 'foo', `foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo', `foo | bar` all passes for function names containing 'foo' or 'bar'. -Z dump-mir-dir=val -- the directory the MIR is dumped into ... ``` Fixes #56558
2 parents ac15b4f + 5f9f05d commit 253c448

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc/session/config.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,13 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
12721272
arg_align_attributes: bool = (false, parse_bool, [TRACKED],
12731273
"emit align metadata for reference arguments"),
12741274
dump_mir: Option<String> = (None, parse_opt_string, [UNTRACKED],
1275-
"dump MIR state at various points in transforms"),
1275+
"dump MIR state to file.
1276+
`val` is used to select which passes and functions to dump. For example:
1277+
`all` matches all passes and functions,
1278+
`foo` matches all passes for functions whose name contains 'foo',
1279+
`foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo',
1280+
`foo | bar` all passes for function names containing 'foo' or 'bar'."),
1281+
12761282
dump_mir_dir: String = (String::from("mir_dump"), parse_string, [UNTRACKED],
12771283
"the directory the MIR is dumped into"),
12781284
dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED],

0 commit comments

Comments
 (0)