@@ -645,8 +645,6 @@ impl Handler {
645
645
646
646
/// Construct a builder with the `msg` at the level appropriate for the specific `EmissionGuarantee`.
647
647
#[ rustc_lint_diagnostics]
648
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
649
- #[ allow( rustc:: untranslatable_diagnostic) ]
650
648
pub fn struct_diagnostic < G : EmissionGuarantee > (
651
649
& self ,
652
650
msg : impl Into < DiagnosticMessage > ,
@@ -660,8 +658,6 @@ impl Handler {
660
658
/// * `can_emit_warnings` is `true`
661
659
/// * `is_force_warn` was set in `DiagnosticId::Lint`
662
660
#[ rustc_lint_diagnostics]
663
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
664
- #[ allow( rustc:: untranslatable_diagnostic) ]
665
661
pub fn struct_span_warn (
666
662
& self ,
667
663
span : impl Into < MultiSpan > ,
@@ -678,8 +674,6 @@ impl Handler {
678
674
/// Attempting to `.emit()` the builder will only emit if either:
679
675
/// * `can_emit_warnings` is `true`
680
676
/// * `is_force_warn` was set in `DiagnosticId::Lint`
681
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
682
- #[ allow( rustc:: untranslatable_diagnostic) ]
683
677
pub fn struct_span_warn_with_expectation (
684
678
& self ,
685
679
span : impl Into < MultiSpan > ,
@@ -693,8 +687,6 @@ impl Handler {
693
687
694
688
/// Construct a builder at the `Allow` level at the given `span` and with the `msg`.
695
689
#[ rustc_lint_diagnostics]
696
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
697
- #[ allow( rustc:: untranslatable_diagnostic) ]
698
690
pub fn struct_span_allow (
699
691
& self ,
700
692
span : impl Into < MultiSpan > ,
@@ -708,8 +700,6 @@ impl Handler {
708
700
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
709
701
/// Also include a code.
710
702
#[ rustc_lint_diagnostics]
711
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
712
- #[ allow( rustc:: untranslatable_diagnostic) ]
713
703
pub fn struct_span_warn_with_code (
714
704
& self ,
715
705
span : impl Into < MultiSpan > ,
@@ -727,8 +717,6 @@ impl Handler {
727
717
/// * `can_emit_warnings` is `true`
728
718
/// * `is_force_warn` was set in `DiagnosticId::Lint`
729
719
#[ rustc_lint_diagnostics]
730
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
731
- #[ allow( rustc:: untranslatable_diagnostic) ]
732
720
pub fn struct_warn ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
733
721
DiagnosticBuilder :: new ( self , Level :: Warning ( None ) , msg)
734
722
}
@@ -739,8 +727,6 @@ impl Handler {
739
727
/// Attempting to `.emit()` the builder will only emit if either:
740
728
/// * `can_emit_warnings` is `true`
741
729
/// * `is_force_warn` was set in `DiagnosticId::Lint`
742
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
743
- #[ allow( rustc:: untranslatable_diagnostic) ]
744
730
pub fn struct_warn_with_expectation (
745
731
& self ,
746
732
msg : impl Into < DiagnosticMessage > ,
@@ -751,16 +737,12 @@ impl Handler {
751
737
752
738
/// Construct a builder at the `Allow` level with the `msg`.
753
739
#[ rustc_lint_diagnostics]
754
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
755
- #[ allow( rustc:: untranslatable_diagnostic) ]
756
740
pub fn struct_allow ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
757
741
DiagnosticBuilder :: new ( self , Level :: Allow , msg)
758
742
}
759
743
760
744
/// Construct a builder at the `Expect` level with the `msg`.
761
745
#[ rustc_lint_diagnostics]
762
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
763
- #[ allow( rustc:: untranslatable_diagnostic) ]
764
746
pub fn struct_expect (
765
747
& self ,
766
748
msg : impl Into < DiagnosticMessage > ,
@@ -771,8 +753,6 @@ impl Handler {
771
753
772
754
/// Construct a builder at the `Error` level at the given `span` and with the `msg`.
773
755
#[ rustc_lint_diagnostics]
774
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
775
- #[ allow( rustc:: untranslatable_diagnostic) ]
776
756
pub fn struct_span_err (
777
757
& self ,
778
758
span : impl Into < MultiSpan > ,
@@ -785,8 +765,6 @@ impl Handler {
785
765
786
766
/// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`.
787
767
#[ rustc_lint_diagnostics]
788
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
789
- #[ allow( rustc:: untranslatable_diagnostic) ]
790
768
pub fn struct_span_err_with_code (
791
769
& self ,
792
770
span : impl Into < MultiSpan > ,
@@ -801,8 +779,6 @@ impl Handler {
801
779
/// Construct a builder at the `Error` level with the `msg`.
802
780
// FIXME: This method should be removed (every error should have an associated error code).
803
781
#[ rustc_lint_diagnostics]
804
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
805
- #[ allow( rustc:: untranslatable_diagnostic) ]
806
782
pub fn struct_err (
807
783
& self ,
808
784
msg : impl Into < DiagnosticMessage > ,
@@ -812,16 +788,12 @@ impl Handler {
812
788
813
789
/// This should only be used by `rustc_middle::lint::struct_lint_level`. Do not use it for hard errors.
814
790
#[ doc( hidden) ]
815
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
816
- #[ allow( rustc:: untranslatable_diagnostic) ]
817
791
pub fn struct_err_lint ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
818
792
DiagnosticBuilder :: new ( self , Level :: Error { lint : true } , msg)
819
793
}
820
794
821
795
/// Construct a builder at the `Error` level with the `msg` and the `code`.
822
796
#[ rustc_lint_diagnostics]
823
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
824
- #[ allow( rustc:: untranslatable_diagnostic) ]
825
797
pub fn struct_err_with_code (
826
798
& self ,
827
799
msg : impl Into < DiagnosticMessage > ,
@@ -834,8 +806,6 @@ impl Handler {
834
806
835
807
/// Construct a builder at the `Warn` level with the `msg` and the `code`.
836
808
#[ rustc_lint_diagnostics]
837
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
838
- #[ allow( rustc:: untranslatable_diagnostic) ]
839
809
pub fn struct_warn_with_code (
840
810
& self ,
841
811
msg : impl Into < DiagnosticMessage > ,
@@ -848,8 +818,6 @@ impl Handler {
848
818
849
819
/// Construct a builder at the `Fatal` level at the given `span` and with the `msg`.
850
820
#[ rustc_lint_diagnostics]
851
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
852
- #[ allow( rustc:: untranslatable_diagnostic) ]
853
821
pub fn struct_span_fatal (
854
822
& self ,
855
823
span : impl Into < MultiSpan > ,
@@ -862,8 +830,6 @@ impl Handler {
862
830
863
831
/// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`.
864
832
#[ rustc_lint_diagnostics]
865
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
866
- #[ allow( rustc:: untranslatable_diagnostic) ]
867
833
pub fn struct_span_fatal_with_code (
868
834
& self ,
869
835
span : impl Into < MultiSpan > ,
@@ -877,24 +843,18 @@ impl Handler {
877
843
878
844
/// Construct a builder at the `Error` level with the `msg`.
879
845
#[ rustc_lint_diagnostics]
880
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
881
- #[ allow( rustc:: untranslatable_diagnostic) ]
882
846
pub fn struct_fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , !> {
883
847
DiagnosticBuilder :: new_fatal ( self , msg)
884
848
}
885
849
886
850
/// Construct a builder at the `Help` level with the `msg`.
887
851
#[ rustc_lint_diagnostics]
888
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
889
- #[ allow( rustc:: untranslatable_diagnostic) ]
890
852
pub fn struct_help ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
891
853
DiagnosticBuilder :: new ( self , Level :: Help , msg)
892
854
}
893
855
894
856
/// Construct a builder at the `Note` level with the `msg`.
895
857
#[ rustc_lint_diagnostics]
896
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
897
- #[ allow( rustc:: untranslatable_diagnostic) ]
898
858
pub fn struct_note_without_error (
899
859
& self ,
900
860
msg : impl Into < DiagnosticMessage > ,
0 commit comments