@@ -254,13 +254,6 @@ impl<'a> DiagnosticBuilder<'a, Noted> {
254
254
/// `struct_*` methods on [`Handler`].
255
255
pub ( crate ) fn new_note ( handler : & ' a Handler , message : impl Into < DiagnosticMessage > ) -> Self {
256
256
let diagnostic = Diagnostic :: new_with_code ( Level :: Note , None , message) ;
257
- Self :: new_diagnostic_note ( handler, diagnostic)
258
- }
259
-
260
- /// Creates a new `DiagnosticBuilder` with an already constructed
261
- /// diagnostic.
262
- pub ( crate ) fn new_diagnostic_note ( handler : & ' a Handler , diagnostic : Diagnostic ) -> Self {
263
- debug ! ( "Created new diagnostic" ) ;
264
257
Self {
265
258
inner : DiagnosticBuilderInner {
266
259
state : DiagnosticBuilderState :: Emittable ( handler) ,
@@ -305,13 +298,6 @@ impl<'a> DiagnosticBuilder<'a, Bug> {
305
298
#[ track_caller]
306
299
pub ( crate ) fn new_bug ( handler : & ' a Handler , message : impl Into < DiagnosticMessage > ) -> Self {
307
300
let diagnostic = Diagnostic :: new_with_code ( Level :: Bug , None , message) ;
308
- Self :: new_diagnostic_bug ( handler, diagnostic)
309
- }
310
-
311
- /// Creates a new `DiagnosticBuilder` with an already constructed
312
- /// diagnostic.
313
- pub ( crate ) fn new_diagnostic_bug ( handler : & ' a Handler , diagnostic : Diagnostic ) -> Self {
314
- debug ! ( "Created new diagnostic bug" ) ;
315
301
Self {
316
302
inner : DiagnosticBuilderInner {
317
303
state : DiagnosticBuilderState :: Emittable ( handler) ,
@@ -394,16 +380,6 @@ impl<'a> DiagnosticBuilder<'a, rustc_span::fatal_error::FatalError> {
394
380
message : impl Into < DiagnosticMessage > ,
395
381
) -> Self {
396
382
let diagnostic = Diagnostic :: new_with_code ( Level :: Fatal , None , message) ;
397
- Self :: new_diagnostic_almost_fatal ( handler, diagnostic)
398
- }
399
-
400
- /// Creates a new `DiagnosticBuilder` with an already constructed
401
- /// diagnostic.
402
- pub ( crate ) fn new_diagnostic_almost_fatal (
403
- handler : & ' a Handler ,
404
- diagnostic : Diagnostic ,
405
- ) -> Self {
406
- debug ! ( "Created new diagnostic" ) ;
407
383
Self {
408
384
inner : DiagnosticBuilderInner {
409
385
state : DiagnosticBuilderState :: Emittable ( handler) ,
0 commit comments