Auto merge of #99780 - Nilstrieb:mir-opt-test-line-no, r=oli-obk
Use line numbers relative to the function in mir-opt tests As shown in #99770, the line numbers can be a big source of needless and confusing diffs. This PR adds a new flag `-Zmir-pretty-relative-line-numbers` to make them relative to the function declaration, which avoids most needless diffs from attribute changes. `@JakobDegen` told me that there has been a zulip conversation about disabling line numbers with mixed opinions, so I'd like to get some feedback here, for this hopefully better solution. r? rust-lang/wg-mir-opt
This commit is contained in:
commit
36f4f4aa38
337 changed files with 9956 additions and 9918 deletions
|
|
@ -1960,6 +1960,7 @@ impl<'test> TestCx<'test> {
|
|||
"-Zdump-mir=all",
|
||||
"-Zvalidate-mir",
|
||||
"-Zdump-mir-exclude-pass-number",
|
||||
"-Zmir-pretty-relative-line-numbers=yes",
|
||||
]);
|
||||
if let Some(pass) = &self.props.mir_unit_test {
|
||||
rustc.args(&["-Zmir-opt-level=0", &format!("-Zmir-enable-passes=+{}", pass)]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue