@@ -322,7 +322,7 @@ fn run_compiler(
322
322
1 => panic ! ( "make_input should have provided valid inputs" ) ,
323
323
_ => early_error (
324
324
config. opts . error_format ,
325
- & format ! (
325
+ format ! (
326
326
"multiple input filenames provided (first two filenames are `{}` and `{}`)" ,
327
327
matches. free[ 0 ] , matches. free[ 1 ] ,
328
328
) ,
@@ -527,7 +527,7 @@ fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) {
527
527
}
528
528
}
529
529
Err ( InvalidErrorCode ) => {
530
- early_error ( output, & format ! ( "{code} is not a valid error code" ) ) ;
530
+ early_error ( output, format ! ( "{code} is not a valid error code" ) ) ;
531
531
}
532
532
}
533
533
}
@@ -1102,7 +1102,7 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
1102
1102
. map ( |( flag, _) | format ! ( "{e}. Did you mean `-{flag} {opt}`?" ) ) ,
1103
1103
_ => None ,
1104
1104
} ;
1105
- early_error ( ErrorOutputType :: default ( ) , & msg. unwrap_or_else ( || e. to_string ( ) ) ) ;
1105
+ early_error ( ErrorOutputType :: default ( ) , msg. unwrap_or_else ( || e. to_string ( ) ) ) ;
1106
1106
} ) ;
1107
1107
1108
1108
// For all options we just parsed, we check a few aspects:
@@ -1250,7 +1250,7 @@ pub fn install_ice_hook(bug_report_url: &'static str, extra_info: fn(&Handler))
1250
1250
#[ cfg( windows) ]
1251
1251
if let Some ( msg) = info. payload ( ) . downcast_ref :: < String > ( ) {
1252
1252
if msg. starts_with ( "failed printing to stdout: " ) && msg. ends_with ( "(os error 232)" ) {
1253
- early_error_no_abort ( ErrorOutputType :: default ( ) , & msg) ;
1253
+ early_error_no_abort ( ErrorOutputType :: default ( ) , msg. as_str ( ) ) ;
1254
1254
return ;
1255
1255
}
1256
1256
} ;
@@ -1342,7 +1342,7 @@ pub fn init_rustc_env_logger() {
1342
1342
/// other than `RUSTC_LOG`.
1343
1343
pub fn init_env_logger ( env : & str ) {
1344
1344
if let Err ( error) = rustc_log:: init_env_logger ( env) {
1345
- early_error ( ErrorOutputType :: default ( ) , & error. to_string ( ) ) ;
1345
+ early_error ( ErrorOutputType :: default ( ) , error. to_string ( ) ) ;
1346
1346
}
1347
1347
}
1348
1348
@@ -1409,7 +1409,7 @@ pub fn main() -> ! {
1409
1409
arg. into_string ( ) . unwrap_or_else ( |arg| {
1410
1410
early_error (
1411
1411
ErrorOutputType :: default ( ) ,
1412
- & format ! ( "argument {i} is not valid Unicode: {arg:?}" ) ,
1412
+ format ! ( "argument {i} is not valid Unicode: {arg:?}" ) ,
1413
1413
)
1414
1414
} )
1415
1415
} )
0 commit comments