File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -119,14 +119,14 @@ impl Callbacks {
119
119
let lib = result. unwrap_or_else ( |err| {
120
120
// smoelius: rust-lang/rust#111633 changed the type of `early_error`'s `msg`
121
121
// argument from `&str` to `impl Into<DiagnosticMessage>`.
122
+ let msg = format ! (
123
+ "could not load library `{}`: {}" ,
124
+ path. to_string_lossy( ) ,
125
+ err
126
+ ) ;
122
127
rustc_session:: early_error (
123
128
rustc_session:: config:: ErrorOutputType :: default ( ) ,
124
- format ! (
125
- "could not load library `{}`: {}" ,
126
- path. to_string_lossy( ) ,
127
- err
128
- )
129
- . as_str ( ) ,
129
+ msg. as_str ( ) ,
130
130
) ;
131
131
} ) ;
132
132
Original file line number Diff line number Diff line change @@ -455,9 +455,10 @@ pub fn config_toml(name: &str) -> ConfigResult<Option<toml::Value>> {
455
455
/// etc. includes a call to `init_config`.
456
456
pub fn init_config ( sess : & rustc_session:: Session ) {
457
457
try_init_config ( sess) . unwrap_or_else ( |err| {
458
+ let msg = format ! ( "could not read configuration file: {err}" ) ;
458
459
rustc_session:: early_error (
459
460
rustc_session:: config:: ErrorOutputType :: default ( ) ,
460
- format ! ( "could not read configuration file: {err}" ) . as_str ( ) ,
461
+ msg . as_str ( ) ,
461
462
) ;
462
463
} ) ;
463
464
}
You can’t perform that action at this time.
0 commit comments