@@ -732,19 +732,6 @@ impl DiagCtxt {
732732        self . struct_warn ( msg) . span_mv ( span) 
733733    } 
734734
735-     /// Construct a builder at the `Warning` level at the given `span` and with the `msg`. 
736-      /// Also include a code. 
737-      #[ rustc_lint_diagnostics]  
738-     #[ track_caller]  
739-     pub  fn  struct_span_warn_with_code ( 
740-         & self , 
741-         span :  impl  Into < MultiSpan > , 
742-         msg :  impl  Into < DiagnosticMessage > , 
743-         code :  DiagnosticId , 
744-     )  -> DiagnosticBuilder < ' _ ,  ( ) >  { 
745-         self . struct_span_warn ( span,  msg) . code_mv ( code) 
746-     } 
747- 
748735    /// Construct a builder at the `Warning` level with the `msg`. 
749736     /// 
750737     /// Attempting to `.emit()` the builder will only emit if either: 
@@ -785,18 +772,6 @@ impl DiagCtxt {
785772        self . struct_err ( msg) . span_mv ( span) 
786773    } 
787774
788-     /// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`. 
789-      #[ rustc_lint_diagnostics]  
790-     #[ track_caller]  
791-     pub  fn  struct_span_err_with_code ( 
792-         & self , 
793-         span :  impl  Into < MultiSpan > , 
794-         msg :  impl  Into < DiagnosticMessage > , 
795-         code :  DiagnosticId , 
796-     )  -> DiagnosticBuilder < ' _ >  { 
797-         self . struct_span_err ( span,  msg) . code_mv ( code) 
798-     } 
799- 
800775    /// Construct a builder at the `Error` level with the `msg`. 
801776     // FIXME: This method should be removed (every error should have an associated error code). 
802777    #[ rustc_lint_diagnostics]  
@@ -805,28 +780,6 @@ impl DiagCtxt {
805780        DiagnosticBuilder :: new ( self ,  Error ,  msg) 
806781    } 
807782
808-     /// Construct a builder at the `Error` level with the `msg` and the `code`. 
809-      #[ rustc_lint_diagnostics]  
810-     #[ track_caller]  
811-     pub  fn  struct_err_with_code ( 
812-         & self , 
813-         msg :  impl  Into < DiagnosticMessage > , 
814-         code :  DiagnosticId , 
815-     )  -> DiagnosticBuilder < ' _ >  { 
816-         self . struct_err ( msg) . code_mv ( code) 
817-     } 
818- 
819-     /// Construct a builder at the `Warn` level with the `msg` and the `code`. 
820-      #[ rustc_lint_diagnostics]  
821-     #[ track_caller]  
822-     pub  fn  struct_warn_with_code ( 
823-         & self , 
824-         msg :  impl  Into < DiagnosticMessage > , 
825-         code :  DiagnosticId , 
826-     )  -> DiagnosticBuilder < ' _ ,  ( ) >  { 
827-         self . struct_warn ( msg) . code_mv ( code) 
828-     } 
829- 
830783    /// Construct a builder at the `Fatal` level at the given `span` and with the `msg`. 
831784     #[ rustc_lint_diagnostics]  
832785    #[ track_caller]  
@@ -838,18 +791,6 @@ impl DiagCtxt {
838791        self . struct_fatal ( msg) . span_mv ( span) 
839792    } 
840793
841-     /// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`. 
842-      #[ rustc_lint_diagnostics]  
843-     #[ track_caller]  
844-     pub  fn  struct_span_fatal_with_code ( 
845-         & self , 
846-         span :  impl  Into < MultiSpan > , 
847-         msg :  impl  Into < DiagnosticMessage > , 
848-         code :  DiagnosticId , 
849-     )  -> DiagnosticBuilder < ' _ ,  FatalAbort >  { 
850-         self . struct_span_fatal ( span,  msg) . code_mv ( code) 
851-     } 
852- 
853794    /// Construct a builder at the `Fatal` level with the `msg`. 
854795     #[ rustc_lint_diagnostics]  
855796    #[ track_caller]  
@@ -897,17 +838,6 @@ impl DiagCtxt {
897838        self . struct_span_fatal ( span,  msg) . emit ( ) 
898839    } 
899840
900-     #[ rustc_lint_diagnostics]  
901-     #[ track_caller]  
902-     pub  fn  span_fatal_with_code ( 
903-         & self , 
904-         span :  impl  Into < MultiSpan > , 
905-         msg :  impl  Into < DiagnosticMessage > , 
906-         code :  DiagnosticId , 
907-     )  -> ! { 
908-         self . struct_span_fatal_with_code ( span,  msg,  code) . emit ( ) 
909-     } 
910- 
911841    #[ rustc_lint_diagnostics]  
912842    #[ track_caller]  
913843    pub  fn  span_err ( 
@@ -918,34 +848,12 @@ impl DiagCtxt {
918848        self . struct_span_err ( span,  msg) . emit ( ) 
919849    } 
920850
921-     #[ rustc_lint_diagnostics]  
922-     #[ track_caller]  
923-     pub  fn  span_err_with_code ( 
924-         & self , 
925-         span :  impl  Into < MultiSpan > , 
926-         msg :  impl  Into < DiagnosticMessage > , 
927-         code :  DiagnosticId , 
928-     )  -> ErrorGuaranteed  { 
929-         self . struct_span_err_with_code ( span,  msg,  code) . emit ( ) 
930-     } 
931- 
932851    #[ rustc_lint_diagnostics]  
933852    #[ track_caller]  
934853    pub  fn  span_warn ( & self ,  span :  impl  Into < MultiSpan > ,  msg :  impl  Into < DiagnosticMessage > )  { 
935854        self . struct_span_warn ( span,  msg) . emit ( ) 
936855    } 
937856
938-     #[ rustc_lint_diagnostics]  
939-     #[ track_caller]  
940-     pub  fn  span_warn_with_code ( 
941-         & self , 
942-         span :  impl  Into < MultiSpan > , 
943-         msg :  impl  Into < DiagnosticMessage > , 
944-         code :  DiagnosticId , 
945-     )  { 
946-         self . struct_span_warn_with_code ( span,  msg,  code) . emit ( ) 
947-     } 
948- 
949857    pub  fn  span_bug ( & self ,  span :  impl  Into < MultiSpan > ,  msg :  impl  Into < DiagnosticMessage > )  -> ! { 
950858        self . struct_span_bug ( span,  msg) . emit ( ) 
951859    } 
0 commit comments