Skip to content

Commit 48394f4

Browse files
shadajsylvestre
authored andcommitted
Ignore --diagnostic-width argument when computing hash
1 parent c7ad05d commit 48394f4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/compiler/rust.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ counted_array!(static ARGS: [ArgInfo<ArgData>; _] = [
10341034
take_arg!("--crate-name", String, CanBeSeparated('='), CrateName),
10351035
take_arg!("--crate-type", ArgCrateTypes, CanBeSeparated('='), CrateType),
10361036
take_arg!("--deny", OsString, CanBeSeparated('='), PassThrough),
1037+
take_arg!("--diagnostic-width", OsString, CanBeSeparated('='), PassThrough),
10371038
take_arg!("--emit", String, CanBeSeparated('='), Emit),
10381039
take_arg!("--error-format", OsString, CanBeSeparated('='), PassThrough),
10391040
take_arg!("--explain", OsString, CanBeSeparated('='), NotCompilation),
@@ -1452,11 +1453,16 @@ where
14521453
let (mut sortables, rest): (Vec<_>, Vec<_>) = os_string_arguments
14531454
.iter()
14541455
// We exclude a few arguments from the hash:
1455-
// -L, --extern, --out-dir
1456+
// -L, --extern, --out-dir, --diagnostic-width
14561457
// These contain paths which aren't relevant to the output, and the compiler inputs
14571458
// in those paths (rlibs and static libs used in the compilation) are used as hash
14581459
// inputs below.
1459-
.filter(|&(arg, _)| !(arg == "--extern" || arg == "-L" || arg == "--out-dir"))
1460+
.filter(|&(arg, _)| {
1461+
!(arg == "--extern"
1462+
|| arg == "-L"
1463+
|| arg == "--out-dir"
1464+
|| arg == "--diagnostic-width")
1465+
})
14601466
// We also exclude `--target` if it specifies a path to a .json file. The file content
14611467
// is used as hash input below.
14621468
// If `--target` specifies a string, it continues to be hashed as part of the arguments.

0 commit comments

Comments
 (0)