@@ -649,7 +649,7 @@ impl Handler {
649
649
/// Attempting to `.emit()` the builder will only emit if either:
650
650
/// * `can_emit_warnings` is `true`
651
651
/// * `is_force_warn` was set in `DiagnosticId::Lint`
652
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
652
+ #[ rustc_lint_diagnostics]
653
653
pub fn struct_span_warn (
654
654
& self ,
655
655
span : impl Into < MultiSpan > ,
@@ -678,7 +678,7 @@ impl Handler {
678
678
}
679
679
680
680
/// Construct a builder at the `Allow` level at the given `span` and with the `msg`.
681
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
681
+ #[ rustc_lint_diagnostics]
682
682
pub fn struct_span_allow (
683
683
& self ,
684
684
span : impl Into < MultiSpan > ,
@@ -691,7 +691,7 @@ impl Handler {
691
691
692
692
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
693
693
/// Also include a code.
694
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
694
+ #[ rustc_lint_diagnostics]
695
695
pub fn struct_span_warn_with_code (
696
696
& self ,
697
697
span : impl Into < MultiSpan > ,
@@ -708,7 +708,7 @@ impl Handler {
708
708
/// Attempting to `.emit()` the builder will only emit if either:
709
709
/// * `can_emit_warnings` is `true`
710
710
/// * `is_force_warn` was set in `DiagnosticId::Lint`
711
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
711
+ #[ rustc_lint_diagnostics]
712
712
pub fn struct_warn ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
713
713
DiagnosticBuilder :: new ( self , Level :: Warning ( None ) , msg)
714
714
}
@@ -728,13 +728,13 @@ impl Handler {
728
728
}
729
729
730
730
/// Construct a builder at the `Allow` level with the `msg`.
731
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
731
+ #[ rustc_lint_diagnostics]
732
732
pub fn struct_allow ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
733
733
DiagnosticBuilder :: new ( self , Level :: Allow , msg)
734
734
}
735
735
736
736
/// Construct a builder at the `Expect` level with the `msg`.
737
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
737
+ #[ rustc_lint_diagnostics]
738
738
pub fn struct_expect (
739
739
& self ,
740
740
msg : impl Into < DiagnosticMessage > ,
@@ -744,7 +744,7 @@ impl Handler {
744
744
}
745
745
746
746
/// Construct a builder at the `Error` level at the given `span` and with the `msg`.
747
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
747
+ #[ rustc_lint_diagnostics]
748
748
pub fn struct_span_err (
749
749
& self ,
750
750
span : impl Into < MultiSpan > ,
@@ -756,7 +756,7 @@ impl Handler {
756
756
}
757
757
758
758
/// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`.
759
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
759
+ #[ rustc_lint_diagnostics]
760
760
pub fn struct_span_err_with_code (
761
761
& self ,
762
762
span : impl Into < MultiSpan > ,
@@ -770,7 +770,7 @@ impl Handler {
770
770
771
771
/// Construct a builder at the `Error` level with the `msg`.
772
772
// FIXME: This method should be removed (every error should have an associated error code).
773
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
773
+ #[ rustc_lint_diagnostics]
774
774
pub fn struct_err (
775
775
& self ,
776
776
msg : impl Into < DiagnosticMessage > ,
@@ -785,7 +785,7 @@ impl Handler {
785
785
}
786
786
787
787
/// Construct a builder at the `Error` level with the `msg` and the `code`.
788
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
788
+ #[ rustc_lint_diagnostics]
789
789
pub fn struct_err_with_code (
790
790
& self ,
791
791
msg : impl Into < DiagnosticMessage > ,
@@ -797,7 +797,7 @@ impl Handler {
797
797
}
798
798
799
799
/// Construct a builder at the `Warn` level with the `msg` and the `code`.
800
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
800
+ #[ rustc_lint_diagnostics]
801
801
pub fn struct_warn_with_code (
802
802
& self ,
803
803
msg : impl Into < DiagnosticMessage > ,
@@ -809,7 +809,7 @@ impl Handler {
809
809
}
810
810
811
811
/// Construct a builder at the `Fatal` level at the given `span` and with the `msg`.
812
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
812
+ #[ rustc_lint_diagnostics]
813
813
pub fn struct_span_fatal (
814
814
& self ,
815
815
span : impl Into < MultiSpan > ,
@@ -821,7 +821,7 @@ impl Handler {
821
821
}
822
822
823
823
/// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`.
824
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
824
+ #[ rustc_lint_diagnostics]
825
825
pub fn struct_span_fatal_with_code (
826
826
& self ,
827
827
span : impl Into < MultiSpan > ,
@@ -834,33 +834,33 @@ impl Handler {
834
834
}
835
835
836
836
/// Construct a builder at the `Error` level with the `msg`.
837
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
837
+ #[ rustc_lint_diagnostics]
838
838
pub fn struct_fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , !> {
839
839
DiagnosticBuilder :: new_fatal ( self , msg)
840
840
}
841
841
842
842
/// Construct a builder at the `Help` level with the `msg`.
843
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
843
+ #[ rustc_lint_diagnostics]
844
844
pub fn struct_help ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
845
845
DiagnosticBuilder :: new ( self , Level :: Help , msg)
846
846
}
847
847
848
848
/// Construct a builder at the `Note` level with the `msg`.
849
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
849
+ #[ rustc_lint_diagnostics]
850
850
pub fn struct_note_without_error (
851
851
& self ,
852
852
msg : impl Into < DiagnosticMessage > ,
853
853
) -> DiagnosticBuilder < ' _ , ( ) > {
854
854
DiagnosticBuilder :: new ( self , Level :: Note , msg)
855
855
}
856
856
857
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
857
+ #[ rustc_lint_diagnostics]
858
858
pub fn span_fatal ( & self , span : impl Into < MultiSpan > , msg : impl Into < DiagnosticMessage > ) -> ! {
859
859
self . emit_diag_at_span ( Diagnostic :: new ( Fatal , msg) , span) ;
860
860
FatalError . raise ( )
861
861
}
862
862
863
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
863
+ #[ rustc_lint_diagnostics]
864
864
pub fn span_fatal_with_code (
865
865
& self ,
866
866
span : impl Into < MultiSpan > ,
@@ -871,7 +871,7 @@ impl Handler {
871
871
FatalError . raise ( )
872
872
}
873
873
874
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
874
+ #[ rustc_lint_diagnostics]
875
875
pub fn span_err (
876
876
& self ,
877
877
span : impl Into < MultiSpan > ,
@@ -880,7 +880,7 @@ impl Handler {
880
880
self . emit_diag_at_span ( Diagnostic :: new ( Error { lint : false } , msg) , span) . unwrap ( )
881
881
}
882
882
883
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
883
+ #[ rustc_lint_diagnostics]
884
884
pub fn span_err_with_code (
885
885
& self ,
886
886
span : impl Into < MultiSpan > ,
@@ -893,12 +893,12 @@ impl Handler {
893
893
) ;
894
894
}
895
895
896
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
896
+ #[ rustc_lint_diagnostics]
897
897
pub fn span_warn ( & self , span : impl Into < MultiSpan > , msg : impl Into < DiagnosticMessage > ) {
898
898
self . emit_diag_at_span ( Diagnostic :: new ( Warning ( None ) , msg) , span) ;
899
899
}
900
900
901
- #[ cfg_attr ( not ( bootstrap ) , rustc_lint_diagnostics) ]
901
+ #[ rustc_lint_diagnostics]
902
902
pub fn span_warn_with_code (
903
903
& self ,
904
904
span : impl Into < MultiSpan > ,
0 commit comments