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 {
973973
974974 fn panic_if_treat_err_as_bug ( & self ) {
975975 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 ! (
981980 "aborting after {} errors due to `-Z treat-err-as-bug={}`" ,
982981 count, as_bug,
983982 ) ,
984- } ;
985- panic ! ( s) ;
983+ }
986984 }
987985 }
988986}
You can’t perform that action at this time.
0 commit comments