@@ -356,38 +356,23 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
356356 self . emit ( )
357357 }
358358
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(
378365 & mut self ,
379366 spans: impl IntoIterator <Item = Span >,
380367 label: & str ,
381368 ) -> & mut Self ) ;
382-
383369 forward ! ( pub fn note_expected_found(
384370 & mut self ,
385371 expected_label: & dyn fmt:: Display ,
386372 expected: DiagnosticStyledString ,
387373 found_label: & dyn fmt:: Display ,
388374 found: DiagnosticStyledString ,
389375 ) -> & mut Self ) ;
390-
391376 forward ! ( pub fn note_expected_found_extra(
392377 & mut self ,
393378 expected_label: & dyn fmt:: Display ,
@@ -397,7 +382,6 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
397382 expected_extra: & dyn fmt:: Display ,
398383 found_extra: & dyn fmt:: Display ,
399384 ) -> & mut Self ) ;
400-
401385 forward ! ( pub fn note( & mut self , msg: impl Into <SubdiagnosticMessage >) -> & mut Self ) ;
402386 forward ! ( pub fn note_once( & mut self , msg: impl Into <SubdiagnosticMessage >) -> & mut Self ) ;
403387 forward ! ( pub fn span_note(
@@ -424,9 +408,7 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
424408 msg: impl Into <SubdiagnosticMessage >,
425409 ) -> & mut Self ) ;
426410 forward ! ( pub fn is_lint( & mut self , ) -> & mut Self ) ;
427-
428411 forward ! ( pub fn disable_suggestions( & mut self , ) -> & mut Self ) ;
429-
430412 forward ! ( pub fn multipart_suggestion(
431413 & mut self ,
432414 msg: impl Into <SubdiagnosticMessage >,
@@ -493,7 +475,6 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
493475 suggestion: impl ToString ,
494476 applicability: Applicability ,
495477 ) -> & mut Self ) ;
496-
497478 forward ! ( pub fn primary_message( & mut self , msg: impl Into <DiagnosticMessage >) -> & mut Self ) ;
498479 forward ! ( pub fn span( & mut self , sp: impl Into <MultiSpan >) -> & mut Self ) ;
499480 forward ! ( pub fn code( & mut self , s: DiagnosticId ) -> & mut Self ) ;
@@ -502,7 +483,6 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
502483 name: impl Into <Cow <' static , str >>,
503484 arg: impl IntoDiagnosticArg ,
504485 ) -> & mut Self ) ;
505-
506486 forward ! ( pub fn subdiagnostic(
507487 & mut self ,
508488 subdiagnostic: impl crate :: AddToDiagnostic
0 commit comments