@@ -732,19 +732,6 @@ impl DiagCtxt {
732
732
self . struct_warn ( msg) . span_mv ( span)
733
733
}
734
734
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
-
748
735
/// Construct a builder at the `Warning` level with the `msg`.
749
736
///
750
737
/// Attempting to `.emit()` the builder will only emit if either:
@@ -785,18 +772,6 @@ impl DiagCtxt {
785
772
self . struct_err ( msg) . span_mv ( span)
786
773
}
787
774
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
-
800
775
/// Construct a builder at the `Error` level with the `msg`.
801
776
// FIXME: This method should be removed (every error should have an associated error code).
802
777
#[ rustc_lint_diagnostics]
@@ -805,28 +780,6 @@ impl DiagCtxt {
805
780
DiagnosticBuilder :: new ( self , Error , msg)
806
781
}
807
782
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
-
830
783
/// Construct a builder at the `Fatal` level at the given `span` and with the `msg`.
831
784
#[ rustc_lint_diagnostics]
832
785
#[ track_caller]
@@ -838,18 +791,6 @@ impl DiagCtxt {
838
791
self . struct_fatal ( msg) . span_mv ( span)
839
792
}
840
793
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
-
853
794
/// Construct a builder at the `Fatal` level with the `msg`.
854
795
#[ rustc_lint_diagnostics]
855
796
#[ track_caller]
@@ -897,17 +838,6 @@ impl DiagCtxt {
897
838
self . struct_span_fatal ( span, msg) . emit ( )
898
839
}
899
840
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
-
911
841
#[ rustc_lint_diagnostics]
912
842
#[ track_caller]
913
843
pub fn span_err (
@@ -918,34 +848,12 @@ impl DiagCtxt {
918
848
self . struct_span_err ( span, msg) . emit ( )
919
849
}
920
850
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
-
932
851
#[ rustc_lint_diagnostics]
933
852
#[ track_caller]
934
853
pub fn span_warn ( & self , span : impl Into < MultiSpan > , msg : impl Into < DiagnosticMessage > ) {
935
854
self . struct_span_warn ( span, msg) . emit ( )
936
855
}
937
856
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
-
949
857
pub fn span_bug ( & self , span : impl Into < MultiSpan > , msg : impl Into < DiagnosticMessage > ) -> ! {
950
858
self . struct_span_bug ( span, msg) . emit ( )
951
859
}
0 commit comments