@@ -734,19 +734,6 @@ impl DiagCtxt {
734734 self . struct_warn ( msg) . span_mv ( span)
735735 }
736736
737- /// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
738- /// Also include a code.
739- #[ rustc_lint_diagnostics]
740- #[ track_caller]
741- pub fn struct_span_warn_with_code (
742- & self ,
743- span : impl Into < MultiSpan > ,
744- msg : impl Into < DiagnosticMessage > ,
745- code : DiagnosticId ,
746- ) -> DiagnosticBuilder < ' _ , ( ) > {
747- self . struct_span_warn ( span, msg) . code_mv ( code)
748- }
749-
750737 /// Construct a builder at the `Warning` level with the `msg`.
751738 ///
752739 /// Attempting to `.emit()` the builder will only emit if either:
@@ -787,18 +774,6 @@ impl DiagCtxt {
787774 self . struct_err ( msg) . span_mv ( span)
788775 }
789776
790- /// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`.
791- #[ rustc_lint_diagnostics]
792- #[ track_caller]
793- pub fn struct_span_err_with_code (
794- & self ,
795- span : impl Into < MultiSpan > ,
796- msg : impl Into < DiagnosticMessage > ,
797- code : DiagnosticId ,
798- ) -> DiagnosticBuilder < ' _ > {
799- self . struct_span_err ( span, msg) . code_mv ( code)
800- }
801-
802777 /// Construct a builder at the `Error` level with the `msg`.
803778 // FIXME: This method should be removed (every error should have an associated error code).
804779 #[ rustc_lint_diagnostics]
@@ -807,28 +782,6 @@ impl DiagCtxt {
807782 DiagnosticBuilder :: new ( self , Error , msg)
808783 }
809784
810- /// Construct a builder at the `Error` level with the `msg` and the `code`.
811- #[ rustc_lint_diagnostics]
812- #[ track_caller]
813- pub fn struct_err_with_code (
814- & self ,
815- msg : impl Into < DiagnosticMessage > ,
816- code : DiagnosticId ,
817- ) -> DiagnosticBuilder < ' _ > {
818- self . struct_err ( msg) . code_mv ( code)
819- }
820-
821- /// Construct a builder at the `Warn` level with the `msg` and the `code`.
822- #[ rustc_lint_diagnostics]
823- #[ track_caller]
824- pub fn struct_warn_with_code (
825- & self ,
826- msg : impl Into < DiagnosticMessage > ,
827- code : DiagnosticId ,
828- ) -> DiagnosticBuilder < ' _ , ( ) > {
829- self . struct_warn ( msg) . code_mv ( code)
830- }
831-
832785 /// Construct a builder at the `Fatal` level at the given `span` and with the `msg`.
833786 #[ rustc_lint_diagnostics]
834787 #[ track_caller]
@@ -840,18 +793,6 @@ impl DiagCtxt {
840793 self . struct_fatal ( msg) . span_mv ( span)
841794 }
842795
843- /// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`.
844- #[ rustc_lint_diagnostics]
845- #[ track_caller]
846- pub fn struct_span_fatal_with_code (
847- & self ,
848- span : impl Into < MultiSpan > ,
849- msg : impl Into < DiagnosticMessage > ,
850- code : DiagnosticId ,
851- ) -> DiagnosticBuilder < ' _ , FatalAbort > {
852- self . struct_span_fatal ( span, msg) . code_mv ( code)
853- }
854-
855796 /// Construct a builder at the `Fatal` level with the `msg`.
856797 #[ rustc_lint_diagnostics]
857798 #[ track_caller]
@@ -899,17 +840,6 @@ impl DiagCtxt {
899840 self . struct_span_fatal ( span, msg) . emit ( )
900841 }
901842
902- #[ rustc_lint_diagnostics]
903- #[ track_caller]
904- pub fn span_fatal_with_code (
905- & self ,
906- span : impl Into < MultiSpan > ,
907- msg : impl Into < DiagnosticMessage > ,
908- code : DiagnosticId ,
909- ) -> ! {
910- self . struct_span_fatal_with_code ( span, msg, code) . emit ( )
911- }
912-
913843 #[ rustc_lint_diagnostics]
914844 #[ track_caller]
915845 pub fn span_err (
@@ -920,34 +850,12 @@ impl DiagCtxt {
920850 self . struct_span_err ( span, msg) . emit ( )
921851 }
922852
923- #[ rustc_lint_diagnostics]
924- #[ track_caller]
925- pub fn span_err_with_code (
926- & self ,
927- span : impl Into < MultiSpan > ,
928- msg : impl Into < DiagnosticMessage > ,
929- code : DiagnosticId ,
930- ) -> ErrorGuaranteed {
931- self . struct_span_err_with_code ( span, msg, code) . emit ( )
932- }
933-
934853 #[ rustc_lint_diagnostics]
935854 #[ track_caller]
936855 pub fn span_warn ( & self , span : impl Into < MultiSpan > , msg : impl Into < DiagnosticMessage > ) {
937856 self . struct_span_warn ( span, msg) . emit ( )
938857 }
939858
940- #[ rustc_lint_diagnostics]
941- #[ track_caller]
942- pub fn span_warn_with_code (
943- & self ,
944- span : impl Into < MultiSpan > ,
945- msg : impl Into < DiagnosticMessage > ,
946- code : DiagnosticId ,
947- ) {
948- self . struct_span_warn_with_code ( span, msg, code) . emit ( )
949- }
950-
951859 pub fn span_bug ( & self , span : impl Into < MultiSpan > , msg : impl Into < DiagnosticMessage > ) -> ! {
952860 self . struct_span_bug ( span, msg) . emit ( )
953861 }
0 commit comments