File tree 1 file changed +3
-10
lines changed
compiler/rustc_errors/src
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -1096,10 +1096,7 @@ impl Handler {
1096
1096
1097
1097
#[ rustc_lint_diagnostics]
1098
1098
pub fn err ( & self , msg : impl Into < DiagnosticMessage > ) -> ErrorGuaranteed {
1099
- self . inner
1100
- . borrow_mut ( )
1101
- . emit_diagnostic ( & mut Diagnostic :: new ( Error { lint : false } , msg) )
1102
- . unwrap ( )
1099
+ DiagnosticBuilder :: < ErrorGuaranteed > :: new ( self , Error { lint : false } , msg) . emit ( )
1103
1100
}
1104
1101
1105
1102
#[ rustc_lint_diagnostics]
@@ -1113,7 +1110,8 @@ impl Handler {
1113
1110
}
1114
1111
1115
1112
pub fn bug ( & self , msg : impl Into < DiagnosticMessage > ) -> ! {
1116
- self . inner . borrow_mut ( ) . bug ( msg)
1113
+ DiagnosticBuilder :: < diagnostic_builder:: Bug > :: new ( self , Bug , msg) . emit ( ) ;
1114
+ panic:: panic_any ( ExplicitBug ) ;
1117
1115
}
1118
1116
1119
1117
#[ inline]
@@ -1601,11 +1599,6 @@ impl HandlerInner {
1601
1599
FatalError
1602
1600
}
1603
1601
1604
- fn bug ( & mut self , msg : impl Into < DiagnosticMessage > ) -> ! {
1605
- self . emit_diagnostic ( & mut Diagnostic :: new ( Bug , msg) ) ;
1606
- panic:: panic_any ( ExplicitBug ) ;
1607
- }
1608
-
1609
1602
fn flush_delayed (
1610
1603
& mut self ,
1611
1604
bugs : impl IntoIterator < Item = DelayedDiagnostic > ,
You can’t perform that action at this time.
0 commit comments