Skip to content

Commit af0a680

Browse files
author
Orion Gonzalez
committed
s/display-diff-tool/compiletest-diff-tool/
1 parent f6b8b49 commit af0a680

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

config.example.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@
415415
#android-ndk = "/path/to/android-ndk-r26d"
416416

417417
# What custom diff tool to use for displaying compiletest tests.
418-
#display-diff-tool = "difft --color=always --background=light --display=side-by-side"
418+
#compiletest-diff-tool = "difft --color=always --background=light --display=side-by-side"
419419

420420
# =============================================================================
421421
# General install configuration options

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,8 +1834,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18341834
if builder.config.cmd.only_modified() {
18351835
cmd.arg("--only-modified");
18361836
}
1837-
if let Some(display_diff_tool) = &builder.config.display_diff_tool {
1838-
cmd.arg("--display-diff-tool").arg(display_diff_tool);
1837+
if let Some(compiletest_diff_tool) = &builder.config.compiletest_diff_tool {
1838+
cmd.arg("--compiletest-diff-tool").arg(compiletest_diff_tool);
18391839
}
18401840

18411841
let mut flags = if is_rustdoc { Vec::new() } else { vec!["-Crpath".to_string()] };

src/bootstrap/src/core/config/config.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ pub struct Config {
369369
/// `paths=["foo", "bar"]`.
370370
pub paths: Vec<PathBuf>,
371371

372-
/// What custom diff tool to use for displaying compiletest tests.
373-
pub display_diff_tool: Option<String>,
372+
/// Command for visual diff display, e.g. `diff-tool --color=always`.
373+
pub compiletest_diff_tool: Option<String>,
374374
}
375375

376376
#[derive(Clone, Debug, Default)]
@@ -894,7 +894,7 @@ define_config! {
894894
metrics: Option<bool> = "metrics",
895895
android_ndk: Option<PathBuf> = "android-ndk",
896896
optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
897-
display_diff_tool: Option<String> = "display-diff-tool",
897+
compiletest_diff_tool: Option<String> = "compiletest-diff-tool",
898898
}
899899
}
900900

@@ -1515,7 +1515,7 @@ impl Config {
15151515
metrics: _,
15161516
android_ndk,
15171517
optimized_compiler_builtins,
1518-
display_diff_tool,
1518+
compiletest_diff_tool,
15191519
} = toml.build.unwrap_or_default();
15201520

15211521
if let Some(file_build) = build {
@@ -2160,7 +2160,7 @@ impl Config {
21602160
config.rust_debuginfo_level_tests = debuginfo_level_tests.unwrap_or(DebuginfoLevel::None);
21612161
config.optimized_compiler_builtins =
21622162
optimized_compiler_builtins.unwrap_or(config.channel != "dev");
2163-
config.display_diff_tool = display_diff_tool;
2163+
config.compiletest_diff_tool = compiletest_diff_tool;
21642164

21652165
let download_rustc = config.download_rustc_commit.is_some();
21662166
// See https://github.com/rust-lang/compiler-team/issues/326

src/tools/compiletest/src/common.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ pub struct Config {
388388
/// Used by the "needs-profiler-runtime" directive in test files.
389389
pub profiler_runtime: bool,
390390

391+
/// Command for visual diff display, e.g. `diff-tool --color=always`.
391392
pub diff_command: Option<String>,
392393
}
393394

src/tools/compiletest/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
178178
)
179179
.optopt(
180180
"",
181-
"display-diff-tool",
181+
"compiletest-diff-tool",
182182
"What custom diff tool to use for displaying compiletest tests.",
183183
"COMMAND",
184184
);
@@ -370,7 +370,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
370370
git_merge_commit_email: matches.opt_str("git-merge-commit-email").unwrap(),
371371

372372
profiler_runtime: matches.opt_present("profiler-runtime"),
373-
diff_command: matches.opt_str("display-diff-tool"),
373+
diff_command: matches.opt_str("compiletest-diff-tool"),
374374
}
375375
}
376376

0 commit comments

Comments
 (0)