@@ -106,13 +106,6 @@ pub trait EmissionGuarantee: Sized {
106106 /// of `Self` without actually performing the emission.
107107 #[ track_caller]
108108 fn diagnostic_builder_emit_producing_guarantee ( db : & mut DiagnosticBuilder < ' _ , Self > ) -> Self ;
109-
110- /// Creates a new `DiagnosticBuilder` that will return this type of guarantee.
111- #[ track_caller]
112- fn make_diagnostic_builder (
113- dcx : & DiagCtxt ,
114- msg : impl Into < DiagnosticMessage > ,
115- ) -> DiagnosticBuilder < ' _ , Self > ;
116109}
117110
118111impl < ' a > DiagnosticBuilder < ' a , ErrorGuaranteed > {
@@ -163,14 +156,6 @@ impl EmissionGuarantee for ErrorGuaranteed {
163156 }
164157 }
165158 }
166-
167- #[ track_caller]
168- fn make_diagnostic_builder (
169- dcx : & DiagCtxt ,
170- msg : impl Into < DiagnosticMessage > ,
171- ) -> DiagnosticBuilder < ' _ , Self > {
172- DiagnosticBuilder :: new ( dcx, Level :: Error { lint : false } , msg)
173- }
174159}
175160
176161// FIXME(eddyb) should there be a `Option<ErrorGuaranteed>` impl as well?
@@ -187,13 +172,6 @@ impl EmissionGuarantee for () {
187172 DiagnosticBuilderState :: AlreadyEmittedOrDuringCancellation => { }
188173 }
189174 }
190-
191- fn make_diagnostic_builder (
192- dcx : & DiagCtxt ,
193- msg : impl Into < DiagnosticMessage > ,
194- ) -> DiagnosticBuilder < ' _ , Self > {
195- DiagnosticBuilder :: new ( dcx, Level :: Warning ( None ) , msg)
196- }
197175}
198176
199177/// Marker type which enables implementation of `create_note` and `emit_note` functions for
@@ -215,13 +193,6 @@ impl EmissionGuarantee for Noted {
215193
216194 Noted
217195 }
218-
219- fn make_diagnostic_builder (
220- dcx : & DiagCtxt ,
221- msg : impl Into < DiagnosticMessage > ,
222- ) -> DiagnosticBuilder < ' _ , Self > {
223- DiagnosticBuilder :: new ( dcx, Level :: Note , msg)
224- }
225196}
226197
227198/// Marker type which enables implementation of `create_bug` and `emit_bug` functions for
@@ -244,13 +215,6 @@ impl EmissionGuarantee for Bug {
244215 // Then panic. No need to return the marker type.
245216 panic:: panic_any ( ExplicitBug ) ;
246217 }
247-
248- fn make_diagnostic_builder (
249- dcx : & DiagCtxt ,
250- msg : impl Into < DiagnosticMessage > ,
251- ) -> DiagnosticBuilder < ' _ , Self > {
252- DiagnosticBuilder :: new ( dcx, Level :: Bug , msg)
253- }
254218}
255219
256220impl EmissionGuarantee for ! {
@@ -268,13 +232,6 @@ impl EmissionGuarantee for ! {
268232 // Then fatally error, returning `!`
269233 crate :: FatalError . raise ( )
270234 }
271-
272- fn make_diagnostic_builder (
273- dcx : & DiagCtxt ,
274- msg : impl Into < DiagnosticMessage > ,
275- ) -> DiagnosticBuilder < ' _ , Self > {
276- DiagnosticBuilder :: new ( dcx, Level :: Fatal , msg)
277- }
278235}
279236
280237impl EmissionGuarantee for rustc_span:: fatal_error:: FatalError {
@@ -292,13 +249,6 @@ impl EmissionGuarantee for rustc_span::fatal_error::FatalError {
292249 // Then fatally error..
293250 rustc_span:: fatal_error:: FatalError
294251 }
295-
296- fn make_diagnostic_builder (
297- dcx : & DiagCtxt ,
298- msg : impl Into < DiagnosticMessage > ,
299- ) -> DiagnosticBuilder < ' _ , Self > {
300- DiagnosticBuilder :: new ( dcx, Level :: Fatal , msg)
301- }
302252}
303253
304254/// In general, the `DiagnosticBuilder` uses deref to allow access to
0 commit comments