File tree Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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, .. } => {
Original file line number Diff line number Diff 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" )
Original file line number Diff line number Diff line change 77
88fn 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"
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments