summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2022-07-27 20:42:07 +0200
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2022-07-28 11:59:54 +0200
commit7cf7ead0bc840b097b770773b7a58d99bf3f5bdf (patch)
treebecd6260027a919dbdf48a5580e37d1f0b8fb84d /compiler/rustc_session/src
parent2643b16468fda787470340890212591d8bc832b7 (diff)
downloadrust-7cf7ead0bc840b097b770773b7a58d99bf3f5bdf.tar.gz
rust-7cf7ead0bc840b097b770773b7a58d99bf3f5bdf.zip
Use line numbers relative to function in mir opt tests
This adds a new option, `-Zmir-pretty-relative-line-numbers`, that
is then used in compiletest for the mir-opt tests.
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/options.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index 501997679f4..ef314115043 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -1379,6 +1379,8 @@ options! {
         "use like `-Zmir-enable-passes=+DestProp,-InstCombine`. Forces the specified passes to be \
         enabled, overriding all other checks. Passes that are not specified are enabled or \
         disabled by other flags as usual."),
+    mir_pretty_relative_line_numbers: bool = (false, parse_bool, [UNTRACKED],
+        "use line numbers relative to the function in mir pretty printing"),
     #[cfg_attr(not(bootstrap), rustc_lint_opt_deny_field_access("use `Session::mir_opt_level` instead of this field"))]
     mir_opt_level: Option<usize> = (None, parse_opt_number, [TRACKED],
         "MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"),