File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -973,16 +973,14 @@ impl HandlerInner {
973
973
974
974
fn panic_if_treat_err_as_bug ( & self ) {
975
975
if self . treat_err_as_bug ( ) {
976
- let s = match ( self . err_count ( ) , self . flags . treat_err_as_bug . unwrap_or ( 0 ) ) {
977
- ( 0 , _) => return ,
978
- ( 1 , 1 ) => "aborting due to `-Z treat-err-as-bug=1`" . to_string ( ) ,
979
- ( 1 , _) => return ,
980
- ( count, as_bug) => format ! (
976
+ match ( self . err_count ( ) , self . flags . treat_err_as_bug . unwrap_or ( 0 ) ) {
977
+ ( 1 , 1 ) => panic ! ( "aborting due to `-Z treat-err-as-bug=1`" ) ,
978
+ ( 0 , _) | ( 1 , _) => { }
979
+ ( count, as_bug) => panic ! (
981
980
"aborting after {} errors due to `-Z treat-err-as-bug={}`" ,
982
981
count, as_bug,
983
982
) ,
984
- } ;
985
- panic ! ( s) ;
983
+ }
986
984
}
987
985
}
988
986
}
You can’t perform that action at this time.
0 commit comments