@@ -437,11 +437,11 @@ struct HandlerInner {
437
437
/// have been converted.
438
438
check_unstable_expect_diagnostics : bool ,
439
439
440
- /// Expected [`Diagnostic`]s store a [`LintExpectationId`] as part of
440
+ /// Expected [`Diagnostic`][diagnostic::Diagnostic] s store a [`LintExpectationId`] as part of
441
441
/// the lint level. [`LintExpectationId`]s created early during the compilation
442
442
/// (before `HirId`s have been defined) are not stable and can therefore not be
443
443
/// stored on disk. This buffer stores these diagnostics until the ID has been
444
- /// replaced by a stable [`LintExpectationId`]. The [`Diagnostic`]s are the
444
+ /// replaced by a stable [`LintExpectationId`]. The [`Diagnostic`][diagnostic::Diagnostic] s are the
445
445
/// submitted for storage and added to the list of fulfilled expectations.
446
446
unstable_expect_diagnostics : Vec < Diagnostic > ,
447
447
@@ -647,8 +647,6 @@ impl Handler {
647
647
648
648
/// Construct a builder with the `msg` at the level appropriate for the specific `EmissionGuarantee`.
649
649
#[ rustc_lint_diagnostics]
650
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
651
- #[ allow( rustc:: untranslatable_diagnostic) ]
652
650
pub fn struct_diagnostic < G : EmissionGuarantee > (
653
651
& self ,
654
652
msg : impl Into < DiagnosticMessage > ,
@@ -662,8 +660,6 @@ impl Handler {
662
660
/// * `can_emit_warnings` is `true`
663
661
/// * `is_force_warn` was set in `DiagnosticId::Lint`
664
662
#[ rustc_lint_diagnostics]
665
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
666
- #[ allow( rustc:: untranslatable_diagnostic) ]
667
663
pub fn struct_span_warn (
668
664
& self ,
669
665
span : impl Into < MultiSpan > ,
@@ -680,8 +676,6 @@ impl Handler {
680
676
/// Attempting to `.emit()` the builder will only emit if either:
681
677
/// * `can_emit_warnings` is `true`
682
678
/// * `is_force_warn` was set in `DiagnosticId::Lint`
683
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
684
- #[ allow( rustc:: untranslatable_diagnostic) ]
685
679
pub fn struct_span_warn_with_expectation (
686
680
& self ,
687
681
span : impl Into < MultiSpan > ,
@@ -695,8 +689,6 @@ impl Handler {
695
689
696
690
/// Construct a builder at the `Allow` level at the given `span` and with the `msg`.
697
691
#[ rustc_lint_diagnostics]
698
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
699
- #[ allow( rustc:: untranslatable_diagnostic) ]
700
692
pub fn struct_span_allow (
701
693
& self ,
702
694
span : impl Into < MultiSpan > ,
@@ -710,8 +702,6 @@ impl Handler {
710
702
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
711
703
/// Also include a code.
712
704
#[ rustc_lint_diagnostics]
713
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
714
- #[ allow( rustc:: untranslatable_diagnostic) ]
715
705
pub fn struct_span_warn_with_code (
716
706
& self ,
717
707
span : impl Into < MultiSpan > ,
@@ -729,8 +719,6 @@ impl Handler {
729
719
/// * `can_emit_warnings` is `true`
730
720
/// * `is_force_warn` was set in `DiagnosticId::Lint`
731
721
#[ rustc_lint_diagnostics]
732
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
733
- #[ allow( rustc:: untranslatable_diagnostic) ]
734
722
pub fn struct_warn ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
735
723
DiagnosticBuilder :: new ( self , Level :: Warning ( None ) , msg)
736
724
}
@@ -741,8 +729,6 @@ impl Handler {
741
729
/// Attempting to `.emit()` the builder will only emit if either:
742
730
/// * `can_emit_warnings` is `true`
743
731
/// * `is_force_warn` was set in `DiagnosticId::Lint`
744
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
745
- #[ allow( rustc:: untranslatable_diagnostic) ]
746
732
pub fn struct_warn_with_expectation (
747
733
& self ,
748
734
msg : impl Into < DiagnosticMessage > ,
@@ -753,16 +739,12 @@ impl Handler {
753
739
754
740
/// Construct a builder at the `Allow` level with the `msg`.
755
741
#[ rustc_lint_diagnostics]
756
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
757
- #[ allow( rustc:: untranslatable_diagnostic) ]
758
742
pub fn struct_allow ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
759
743
DiagnosticBuilder :: new ( self , Level :: Allow , msg)
760
744
}
761
745
762
746
/// Construct a builder at the `Expect` level with the `msg`.
763
747
#[ rustc_lint_diagnostics]
764
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
765
- #[ allow( rustc:: untranslatable_diagnostic) ]
766
748
pub fn struct_expect (
767
749
& self ,
768
750
msg : impl Into < DiagnosticMessage > ,
@@ -773,8 +755,6 @@ impl Handler {
773
755
774
756
/// Construct a builder at the `Error` level at the given `span` and with the `msg`.
775
757
#[ rustc_lint_diagnostics]
776
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
777
- #[ allow( rustc:: untranslatable_diagnostic) ]
778
758
pub fn struct_span_err (
779
759
& self ,
780
760
span : impl Into < MultiSpan > ,
@@ -787,8 +767,6 @@ impl Handler {
787
767
788
768
/// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`.
789
769
#[ rustc_lint_diagnostics]
790
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
791
- #[ allow( rustc:: untranslatable_diagnostic) ]
792
770
pub fn struct_span_err_with_code (
793
771
& self ,
794
772
span : impl Into < MultiSpan > ,
@@ -803,8 +781,6 @@ impl Handler {
803
781
/// Construct a builder at the `Error` level with the `msg`.
804
782
// FIXME: This method should be removed (every error should have an associated error code).
805
783
#[ rustc_lint_diagnostics]
806
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
807
- #[ allow( rustc:: untranslatable_diagnostic) ]
808
784
pub fn struct_err (
809
785
& self ,
810
786
msg : impl Into < DiagnosticMessage > ,
@@ -814,16 +790,12 @@ impl Handler {
814
790
815
791
/// This should only be used by `rustc_middle::lint::struct_lint_level`. Do not use it for hard errors.
816
792
#[ doc( hidden) ]
817
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
818
- #[ allow( rustc:: untranslatable_diagnostic) ]
819
793
pub fn struct_err_lint ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
820
794
DiagnosticBuilder :: new ( self , Level :: Error { lint : true } , msg)
821
795
}
822
796
823
797
/// Construct a builder at the `Error` level with the `msg` and the `code`.
824
798
#[ rustc_lint_diagnostics]
825
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
826
- #[ allow( rustc:: untranslatable_diagnostic) ]
827
799
pub fn struct_err_with_code (
828
800
& self ,
829
801
msg : impl Into < DiagnosticMessage > ,
@@ -836,8 +808,6 @@ impl Handler {
836
808
837
809
/// Construct a builder at the `Warn` level with the `msg` and the `code`.
838
810
#[ rustc_lint_diagnostics]
839
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
840
- #[ allow( rustc:: untranslatable_diagnostic) ]
841
811
pub fn struct_warn_with_code (
842
812
& self ,
843
813
msg : impl Into < DiagnosticMessage > ,
@@ -850,8 +820,6 @@ impl Handler {
850
820
851
821
/// Construct a builder at the `Fatal` level at the given `span` and with the `msg`.
852
822
#[ rustc_lint_diagnostics]
853
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
854
- #[ allow( rustc:: untranslatable_diagnostic) ]
855
823
pub fn struct_span_fatal (
856
824
& self ,
857
825
span : impl Into < MultiSpan > ,
@@ -864,8 +832,6 @@ impl Handler {
864
832
865
833
/// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`.
866
834
#[ rustc_lint_diagnostics]
867
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
868
- #[ allow( rustc:: untranslatable_diagnostic) ]
869
835
pub fn struct_span_fatal_with_code (
870
836
& self ,
871
837
span : impl Into < MultiSpan > ,
@@ -879,24 +845,18 @@ impl Handler {
879
845
880
846
/// Construct a builder at the `Error` level with the `msg`.
881
847
#[ rustc_lint_diagnostics]
882
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
883
- #[ allow( rustc:: untranslatable_diagnostic) ]
884
848
pub fn struct_fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , !> {
885
849
DiagnosticBuilder :: new_fatal ( self , msg)
886
850
}
887
851
888
852
/// Construct a builder at the `Help` level with the `msg`.
889
853
#[ rustc_lint_diagnostics]
890
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
891
- #[ allow( rustc:: untranslatable_diagnostic) ]
892
854
pub fn struct_help ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
893
855
DiagnosticBuilder :: new ( self , Level :: Help , msg)
894
856
}
895
857
896
858
/// Construct a builder at the `Note` level with the `msg`.
897
859
#[ rustc_lint_diagnostics]
898
- #[ allow( rustc:: diagnostic_outside_of_impl) ]
899
- #[ allow( rustc:: untranslatable_diagnostic) ]
900
860
pub fn struct_note_without_error (
901
861
& self ,
902
862
msg : impl Into < DiagnosticMessage > ,
0 commit comments