Skip to content
/ rust Public
forked from rust-lang/rust

Commit 6907e01

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

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

compiler/rustc_session/src/config.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1427,10 +1427,12 @@ pub fn build_target_config(
14271427
}
14281428
target
14291429
}
1430-
Err(e) => early_dcx.early_fatal(format!(
1431-
"Error loading target specification: {e}. \
1432-
Run `rustc --print target-list` for a list of built-in targets"
1433-
)),
1430+
Err(e) => {
1431+
let mut err =
1432+
early_dcx.early_struct_fatal(format!("error loading target specification: {e}"));
1433+
err.help("run `rustc --print target-list` for a list of built-in targets");
1434+
err.emit();
1435+
}
14341436
}
14351437
}
14361438

compiler/rustc_target/src/spec/mod.rs

+1-1
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

+1-1
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

+1-1
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"
+3-1
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)