@@ -356,38 +356,23 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
356
356
self . emit ( )
357
357
}
358
358
359
- forward ! (
360
- /// Appends a labeled span to the diagnostic.
361
- ///
362
- /// Labels are used to convey additional context for the diagnostic's primary span. They will
363
- /// be shown together with the original diagnostic's span, *not* with spans added by
364
- /// `span_note`, `span_help`, etc. Therefore, if the primary span is not displayable (because
365
- /// the span is `DUMMY_SP` or the source code isn't found), labels will not be displayed
366
- /// either.
367
- ///
368
- /// Implementation-wise, the label span is pushed onto the [`MultiSpan`] that was created when
369
- /// the diagnostic was constructed. However, the label span is *not* considered a
370
- /// ["primary span"][`MultiSpan`]; only the `Span` supplied when creating the diagnostic is
371
- /// primary.
372
- pub fn span_label( & mut self , span: Span , label: impl Into <SubdiagnosticMessage >) -> & mut Self ) ;
373
-
374
- forward ! (
375
- /// Labels all the given spans with the provided label.
376
- /// See [`Diagnostic::span_label()`] for more information.
377
- pub fn span_labels(
359
+ forward ! ( pub fn span_label(
360
+ & mut self ,
361
+ span: Span ,
362
+ label: impl Into <SubdiagnosticMessage >
363
+ ) -> & mut Self ) ;
364
+ forward ! ( pub fn span_labels(
378
365
& mut self ,
379
366
spans: impl IntoIterator <Item = Span >,
380
367
label: & str ,
381
368
) -> & mut Self ) ;
382
-
383
369
forward ! ( pub fn note_expected_found(
384
370
& mut self ,
385
371
expected_label: & dyn fmt:: Display ,
386
372
expected: DiagnosticStyledString ,
387
373
found_label: & dyn fmt:: Display ,
388
374
found: DiagnosticStyledString ,
389
375
) -> & mut Self ) ;
390
-
391
376
forward ! ( pub fn note_expected_found_extra(
392
377
& mut self ,
393
378
expected_label: & dyn fmt:: Display ,
@@ -397,7 +382,6 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
397
382
expected_extra: & dyn fmt:: Display ,
398
383
found_extra: & dyn fmt:: Display ,
399
384
) -> & mut Self ) ;
400
-
401
385
forward ! ( pub fn note( & mut self , msg: impl Into <SubdiagnosticMessage >) -> & mut Self ) ;
402
386
forward ! ( pub fn note_once( & mut self , msg: impl Into <SubdiagnosticMessage >) -> & mut Self ) ;
403
387
forward ! ( pub fn span_note(
@@ -424,9 +408,7 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
424
408
msg: impl Into <SubdiagnosticMessage >,
425
409
) -> & mut Self ) ;
426
410
forward ! ( pub fn is_lint( & mut self , ) -> & mut Self ) ;
427
-
428
411
forward ! ( pub fn disable_suggestions( & mut self , ) -> & mut Self ) ;
429
-
430
412
forward ! ( pub fn multipart_suggestion(
431
413
& mut self ,
432
414
msg: impl Into <SubdiagnosticMessage >,
@@ -493,7 +475,6 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
493
475
suggestion: impl ToString ,
494
476
applicability: Applicability ,
495
477
) -> & mut Self ) ;
496
-
497
478
forward ! ( pub fn primary_message( & mut self , msg: impl Into <DiagnosticMessage >) -> & mut Self ) ;
498
479
forward ! ( pub fn span( & mut self , sp: impl Into <MultiSpan >) -> & mut Self ) ;
499
480
forward ! ( pub fn code( & mut self , s: DiagnosticId ) -> & mut Self ) ;
@@ -502,7 +483,6 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
502
483
name: impl Into <Cow <' static , str >>,
503
484
arg: impl IntoDiagnosticArg ,
504
485
) -> & mut Self ) ;
505
-
506
486
forward ! ( pub fn subdiagnostic(
507
487
& mut self ,
508
488
subdiagnostic: impl crate :: AddToDiagnostic
0 commit comments