@@ -437,11 +437,11 @@ struct HandlerInner {
437437 /// have been converted.
438438 check_unstable_expect_diagnostics : bool ,
439439
440- /// Expected [`Diagnostic`]s store a [`LintExpectationId`] as part of
440+ /// Expected [`Diagnostic`][diagnostic::Diagnostic] s store a [`LintExpectationId`] as part of
441441 /// the lint level. [`LintExpectationId`]s created early during the compilation
442442 /// (before `HirId`s have been defined) are not stable and can therefore not be
443443 /// 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
445445 /// submitted for storage and added to the list of fulfilled expectations.
446446 unstable_expect_diagnostics : Vec < Diagnostic > ,
447447
@@ -647,8 +647,6 @@ impl Handler {
647647
648648 /// Construct a builder with the `msg` at the level appropriate for the specific `EmissionGuarantee`.
649649 #[ rustc_lint_diagnostics]
650- #[ allow( rustc:: diagnostic_outside_of_impl) ]
651- #[ allow( rustc:: untranslatable_diagnostic) ]
652650 pub fn struct_diagnostic < G : EmissionGuarantee > (
653651 & self ,
654652 msg : impl Into < DiagnosticMessage > ,
@@ -662,8 +660,6 @@ impl Handler {
662660 /// * `can_emit_warnings` is `true`
663661 /// * `is_force_warn` was set in `DiagnosticId::Lint`
664662 #[ rustc_lint_diagnostics]
665- #[ allow( rustc:: diagnostic_outside_of_impl) ]
666- #[ allow( rustc:: untranslatable_diagnostic) ]
667663 pub fn struct_span_warn (
668664 & self ,
669665 span : impl Into < MultiSpan > ,
@@ -680,8 +676,6 @@ impl Handler {
680676 /// Attempting to `.emit()` the builder will only emit if either:
681677 /// * `can_emit_warnings` is `true`
682678 /// * `is_force_warn` was set in `DiagnosticId::Lint`
683- #[ allow( rustc:: diagnostic_outside_of_impl) ]
684- #[ allow( rustc:: untranslatable_diagnostic) ]
685679 pub fn struct_span_warn_with_expectation (
686680 & self ,
687681 span : impl Into < MultiSpan > ,
@@ -695,8 +689,6 @@ impl Handler {
695689
696690 /// Construct a builder at the `Allow` level at the given `span` and with the `msg`.
697691 #[ rustc_lint_diagnostics]
698- #[ allow( rustc:: diagnostic_outside_of_impl) ]
699- #[ allow( rustc:: untranslatable_diagnostic) ]
700692 pub fn struct_span_allow (
701693 & self ,
702694 span : impl Into < MultiSpan > ,
@@ -710,8 +702,6 @@ impl Handler {
710702 /// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
711703 /// Also include a code.
712704 #[ rustc_lint_diagnostics]
713- #[ allow( rustc:: diagnostic_outside_of_impl) ]
714- #[ allow( rustc:: untranslatable_diagnostic) ]
715705 pub fn struct_span_warn_with_code (
716706 & self ,
717707 span : impl Into < MultiSpan > ,
@@ -729,8 +719,6 @@ impl Handler {
729719 /// * `can_emit_warnings` is `true`
730720 /// * `is_force_warn` was set in `DiagnosticId::Lint`
731721 #[ rustc_lint_diagnostics]
732- #[ allow( rustc:: diagnostic_outside_of_impl) ]
733- #[ allow( rustc:: untranslatable_diagnostic) ]
734722 pub fn struct_warn ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
735723 DiagnosticBuilder :: new ( self , Level :: Warning ( None ) , msg)
736724 }
@@ -741,8 +729,6 @@ impl Handler {
741729 /// Attempting to `.emit()` the builder will only emit if either:
742730 /// * `can_emit_warnings` is `true`
743731 /// * `is_force_warn` was set in `DiagnosticId::Lint`
744- #[ allow( rustc:: diagnostic_outside_of_impl) ]
745- #[ allow( rustc:: untranslatable_diagnostic) ]
746732 pub fn struct_warn_with_expectation (
747733 & self ,
748734 msg : impl Into < DiagnosticMessage > ,
@@ -753,16 +739,12 @@ impl Handler {
753739
754740 /// Construct a builder at the `Allow` level with the `msg`.
755741 #[ rustc_lint_diagnostics]
756- #[ allow( rustc:: diagnostic_outside_of_impl) ]
757- #[ allow( rustc:: untranslatable_diagnostic) ]
758742 pub fn struct_allow ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
759743 DiagnosticBuilder :: new ( self , Level :: Allow , msg)
760744 }
761745
762746 /// Construct a builder at the `Expect` level with the `msg`.
763747 #[ rustc_lint_diagnostics]
764- #[ allow( rustc:: diagnostic_outside_of_impl) ]
765- #[ allow( rustc:: untranslatable_diagnostic) ]
766748 pub fn struct_expect (
767749 & self ,
768750 msg : impl Into < DiagnosticMessage > ,
@@ -773,8 +755,6 @@ impl Handler {
773755
774756 /// Construct a builder at the `Error` level at the given `span` and with the `msg`.
775757 #[ rustc_lint_diagnostics]
776- #[ allow( rustc:: diagnostic_outside_of_impl) ]
777- #[ allow( rustc:: untranslatable_diagnostic) ]
778758 pub fn struct_span_err (
779759 & self ,
780760 span : impl Into < MultiSpan > ,
@@ -787,8 +767,6 @@ impl Handler {
787767
788768 /// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`.
789769 #[ rustc_lint_diagnostics]
790- #[ allow( rustc:: diagnostic_outside_of_impl) ]
791- #[ allow( rustc:: untranslatable_diagnostic) ]
792770 pub fn struct_span_err_with_code (
793771 & self ,
794772 span : impl Into < MultiSpan > ,
@@ -803,8 +781,6 @@ impl Handler {
803781 /// Construct a builder at the `Error` level with the `msg`.
804782 // FIXME: This method should be removed (every error should have an associated error code).
805783 #[ rustc_lint_diagnostics]
806- #[ allow( rustc:: diagnostic_outside_of_impl) ]
807- #[ allow( rustc:: untranslatable_diagnostic) ]
808784 pub fn struct_err (
809785 & self ,
810786 msg : impl Into < DiagnosticMessage > ,
@@ -814,16 +790,12 @@ impl Handler {
814790
815791 /// This should only be used by `rustc_middle::lint::struct_lint_level`. Do not use it for hard errors.
816792 #[ doc( hidden) ]
817- #[ allow( rustc:: diagnostic_outside_of_impl) ]
818- #[ allow( rustc:: untranslatable_diagnostic) ]
819793 pub fn struct_err_lint ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
820794 DiagnosticBuilder :: new ( self , Level :: Error { lint : true } , msg)
821795 }
822796
823797 /// Construct a builder at the `Error` level with the `msg` and the `code`.
824798 #[ rustc_lint_diagnostics]
825- #[ allow( rustc:: diagnostic_outside_of_impl) ]
826- #[ allow( rustc:: untranslatable_diagnostic) ]
827799 pub fn struct_err_with_code (
828800 & self ,
829801 msg : impl Into < DiagnosticMessage > ,
@@ -836,8 +808,6 @@ impl Handler {
836808
837809 /// Construct a builder at the `Warn` level with the `msg` and the `code`.
838810 #[ rustc_lint_diagnostics]
839- #[ allow( rustc:: diagnostic_outside_of_impl) ]
840- #[ allow( rustc:: untranslatable_diagnostic) ]
841811 pub fn struct_warn_with_code (
842812 & self ,
843813 msg : impl Into < DiagnosticMessage > ,
@@ -850,8 +820,6 @@ impl Handler {
850820
851821 /// Construct a builder at the `Fatal` level at the given `span` and with the `msg`.
852822 #[ rustc_lint_diagnostics]
853- #[ allow( rustc:: diagnostic_outside_of_impl) ]
854- #[ allow( rustc:: untranslatable_diagnostic) ]
855823 pub fn struct_span_fatal (
856824 & self ,
857825 span : impl Into < MultiSpan > ,
@@ -864,8 +832,6 @@ impl Handler {
864832
865833 /// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`.
866834 #[ rustc_lint_diagnostics]
867- #[ allow( rustc:: diagnostic_outside_of_impl) ]
868- #[ allow( rustc:: untranslatable_diagnostic) ]
869835 pub fn struct_span_fatal_with_code (
870836 & self ,
871837 span : impl Into < MultiSpan > ,
@@ -879,24 +845,18 @@ impl Handler {
879845
880846 /// Construct a builder at the `Error` level with the `msg`.
881847 #[ rustc_lint_diagnostics]
882- #[ allow( rustc:: diagnostic_outside_of_impl) ]
883- #[ allow( rustc:: untranslatable_diagnostic) ]
884848 pub fn struct_fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , !> {
885849 DiagnosticBuilder :: new_fatal ( self , msg)
886850 }
887851
888852 /// Construct a builder at the `Help` level with the `msg`.
889853 #[ rustc_lint_diagnostics]
890- #[ allow( rustc:: diagnostic_outside_of_impl) ]
891- #[ allow( rustc:: untranslatable_diagnostic) ]
892854 pub fn struct_help ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
893855 DiagnosticBuilder :: new ( self , Level :: Help , msg)
894856 }
895857
896858 /// Construct a builder at the `Note` level with the `msg`.
897859 #[ rustc_lint_diagnostics]
898- #[ allow( rustc:: diagnostic_outside_of_impl) ]
899- #[ allow( rustc:: untranslatable_diagnostic) ]
900860 pub fn struct_note_without_error (
901861 & self ,
902862 msg : impl Into < DiagnosticMessage > ,
0 commit comments