99#![ feature( let_else) ]  
1010#![ feature( never_type) ]  
1111#![ feature( adt_const_params) ]  
12+ #![ feature( rustc_attrs) ]  
1213#![ allow( incomplete_features) ]  
1314#![ allow( rustc:: potential_query_instability) ]  
1415
@@ -644,6 +645,7 @@ impl Handler {
644645/// Attempting to `.emit()` the builder will only emit if either: 
645646/// * `can_emit_warnings` is `true` 
646647/// * `is_force_warn` was set in `DiagnosticId::Lint` 
648+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
647649    pub  fn  struct_span_warn ( 
648650        & self , 
649651        span :  impl  Into < MultiSpan > , 
@@ -655,6 +657,7 @@ impl Handler {
655657    } 
656658
657659    /// Construct a builder at the `Allow` level at the given `span` and with the `msg`. 
660+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
658661    pub  fn  struct_span_allow ( 
659662        & self , 
660663        span :  impl  Into < MultiSpan > , 
@@ -667,6 +670,7 @@ impl Handler {
667670
668671    /// Construct a builder at the `Warning` level at the given `span` and with the `msg`. 
669672/// Also include a code. 
673+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
670674    pub  fn  struct_span_warn_with_code ( 
671675        & self , 
672676        span :  impl  Into < MultiSpan > , 
@@ -683,16 +687,19 @@ impl Handler {
683687/// Attempting to `.emit()` the builder will only emit if either: 
684688/// * `can_emit_warnings` is `true` 
685689/// * `is_force_warn` was set in `DiagnosticId::Lint` 
690+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
686691    pub  fn  struct_warn ( & self ,  msg :  impl  Into < DiagnosticMessage > )  -> DiagnosticBuilder < ' _ ,  ( ) >  { 
687692        DiagnosticBuilder :: new ( self ,  Level :: Warning ,  msg) 
688693    } 
689694
690695    /// Construct a builder at the `Allow` level with the `msg`. 
696+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
691697    pub  fn  struct_allow ( & self ,  msg :  impl  Into < DiagnosticMessage > )  -> DiagnosticBuilder < ' _ ,  ( ) >  { 
692698        DiagnosticBuilder :: new ( self ,  Level :: Allow ,  msg) 
693699    } 
694700
695701    /// Construct a builder at the `Expect` level with the `msg`. 
702+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
696703    pub  fn  struct_expect ( 
697704        & self , 
698705        msg :  impl  Into < DiagnosticMessage > , 
@@ -702,6 +709,7 @@ impl Handler {
702709    } 
703710
704711    /// Construct a builder at the `Error` level at the given `span` and with the `msg`. 
712+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
705713    pub  fn  struct_span_err ( 
706714        & self , 
707715        span :  impl  Into < MultiSpan > , 
@@ -713,6 +721,7 @@ impl Handler {
713721    } 
714722
715723    /// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`. 
724+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
716725    pub  fn  struct_span_err_with_code ( 
717726        & self , 
718727        span :  impl  Into < MultiSpan > , 
@@ -726,6 +735,7 @@ impl Handler {
726735
727736    /// Construct a builder at the `Error` level with the `msg`. 
728737// FIXME: This method should be removed (every error should have an associated error code). 
738+     #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
729739    pub  fn  struct_err ( 
730740        & self , 
731741        msg :  impl  Into < DiagnosticMessage > , 
@@ -740,6 +750,7 @@ impl Handler {
740750    } 
741751
742752    /// Construct a builder at the `Error` level with the `msg` and the `code`. 
753+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
743754    pub  fn  struct_err_with_code ( 
744755        & self , 
745756        msg :  impl  Into < DiagnosticMessage > , 
@@ -751,6 +762,7 @@ impl Handler {
751762    } 
752763
753764    /// Construct a builder at the `Warn` level with the `msg` and the `code`. 
765+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
754766    pub  fn  struct_warn_with_code ( 
755767        & self , 
756768        msg :  impl  Into < DiagnosticMessage > , 
@@ -762,6 +774,7 @@ impl Handler {
762774    } 
763775
764776    /// Construct a builder at the `Fatal` level at the given `span` and with the `msg`. 
777+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
765778    pub  fn  struct_span_fatal ( 
766779        & self , 
767780        span :  impl  Into < MultiSpan > , 
@@ -773,6 +786,7 @@ impl Handler {
773786    } 
774787
775788    /// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`. 
789+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
776790    pub  fn  struct_span_fatal_with_code ( 
777791        & self , 
778792        span :  impl  Into < MultiSpan > , 
@@ -785,28 +799,33 @@ impl Handler {
785799    } 
786800
787801    /// Construct a builder at the `Error` level with the `msg`. 
802+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
788803    pub  fn  struct_fatal ( & self ,  msg :  impl  Into < DiagnosticMessage > )  -> DiagnosticBuilder < ' _ ,  !>  { 
789804        DiagnosticBuilder :: new_fatal ( self ,  msg) 
790805    } 
791806
792807    /// Construct a builder at the `Help` level with the `msg`. 
808+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
793809    pub  fn  struct_help ( & self ,  msg :  impl  Into < DiagnosticMessage > )  -> DiagnosticBuilder < ' _ ,  ( ) >  { 
794810        DiagnosticBuilder :: new ( self ,  Level :: Help ,  msg) 
795811    } 
796812
797813    /// Construct a builder at the `Note` level with the `msg`. 
814+ #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
798815    pub  fn  struct_note_without_error ( 
799816        & self , 
800817        msg :  impl  Into < DiagnosticMessage > , 
801818    )  -> DiagnosticBuilder < ' _ ,  ( ) >  { 
802819        DiagnosticBuilder :: new ( self ,  Level :: Note ,  msg) 
803820    } 
804821
822+     #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
805823    pub  fn  span_fatal ( & self ,  span :  impl  Into < MultiSpan > ,  msg :  impl  Into < DiagnosticMessage > )  -> ! { 
806824        self . emit_diag_at_span ( Diagnostic :: new ( Fatal ,  msg) ,  span) ; 
807825        FatalError . raise ( ) 
808826    } 
809827
828+     #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
810829    pub  fn  span_fatal_with_code ( 
811830        & self , 
812831        span :  impl  Into < MultiSpan > , 
@@ -817,6 +836,7 @@ impl Handler {
817836        FatalError . raise ( ) 
818837    } 
819838
839+     #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
820840    pub  fn  span_err ( 
821841        & self , 
822842        span :  impl  Into < MultiSpan > , 
@@ -825,6 +845,7 @@ impl Handler {
825845        self . emit_diag_at_span ( Diagnostic :: new ( Error  {  lint :  false  } ,  msg) ,  span) . unwrap ( ) 
826846    } 
827847
848+     #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
828849    pub  fn  span_err_with_code ( 
829850        & self , 
830851        span :  impl  Into < MultiSpan > , 
@@ -837,10 +858,12 @@ impl Handler {
837858        ) ; 
838859    } 
839860
861+     #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
840862    pub  fn  span_warn ( & self ,  span :  impl  Into < MultiSpan > ,  msg :  impl  Into < DiagnosticMessage > )  { 
841863        self . emit_diag_at_span ( Diagnostic :: new ( Warning ,  msg) ,  span) ; 
842864    } 
843865
866+     #[ cfg_attr( not( bootstrap) ,  rustc_lint_diagnostics) ]  
844867    pub  fn  span_warn_with_code ( 
845868        & self , 
846869        span :  impl  Into < MultiSpan > , 
0 commit comments