Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b4b7a73

Browse files
authored
Unrolled build for rust-lang#139285
Rollup merge of rust-lang#139285 - tshepang:uniform-case, r=jieyouxu use lower case to match other error messages
2 parents bad13a9 + 842da5c commit b4b7a73

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,10 +1425,12 @@ pub fn build_target_config(
14251425
}
14261426
target
14271427
}
1428-
Err(e) => early_dcx.early_fatal(format!(
1429-
"Error loading target specification: {e}. \
1430-
Run `rustc --print target-list` for a list of built-in targets"
1431-
)),
1428+
Err(e) => {
1429+
let mut err =
1430+
early_dcx.early_struct_fatal(format!("error loading target specification: {e}"));
1431+
err.help("run `rustc --print target-list` for a list of built-in targets");
1432+
err.emit();
1433+
}
14321434
}
14331435
}
14341436

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3516,7 +3516,7 @@ impl Target {
35163516
Err("the `i586-pc-windows-msvc` target has been removed. Use the `i686-pc-windows-msvc` target instead.\n\
35173517
Windows 10 (the minimum required OS version) requires a CPU baseline of at least i686 so you can safely switch".into())
35183518
} else {
3519-
Err(format!("Could not find specification for target {target_tuple:?}"))
3519+
Err(format!("could not find specification for target {target_tuple:?}"))
35203520
}
35213521
}
35223522
TargetTuple::TargetJson { ref contents, .. } => {

tests/run-make/target-specs/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
.input("foo.rs")
1515
.target("my-invalid-platform.json")
1616
.run_fail()
17-
.assert_stderr_contains("Error loading target specification");
17+
.assert_stderr_contains("error loading target specification");
1818
rustc()
1919
.input("foo.rs")
2020
.target("my-incomplete-platform.json")

tests/ui/errors/wrong-target-spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
fn main() {}
99

10-
//~? ERROR Error loading target specification: Could not find specification for target "x86_64_unknown-linux-musl"
10+
//~? ERROR error loading target specification: could not find specification for target "x86_64_unknown-linux-musl"
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
error: Error loading target specification: Could not find specification for target "x86_64_unknown-linux-musl". Run `rustc --print target-list` for a list of built-in targets
1+
error: error loading target specification: could not find specification for target "x86_64_unknown-linux-musl"
2+
|
3+
= help: run `rustc --print target-list` for a list of built-in targets
24

0 commit comments

Comments
 (0)