@@ -188,7 +188,7 @@ impl<'a> DiagnosticBuilder<'a, ()> {
188
188
level : Level ,
189
189
message : M ,
190
190
) -> Self {
191
- let diagnostic = Diagnostic :: new_with_code ( level, None , message) ;
191
+ let diagnostic = Diagnostic :: new ( level, message) ;
192
192
Self :: new_diagnostic ( handler, diagnostic)
193
193
}
194
194
@@ -257,7 +257,7 @@ impl EmissionGuarantee for Noted {
257
257
DiagnosticBuilder {
258
258
inner : DiagnosticBuilderInner {
259
259
state : DiagnosticBuilderState :: Emittable ( handler) ,
260
- diagnostic : Box :: new ( Diagnostic :: new_with_code ( Level :: Note , None , msg) ) ,
260
+ diagnostic : Box :: new ( Diagnostic :: new ( Level :: Note , msg) ) ,
261
261
} ,
262
262
_marker : PhantomData ,
263
263
}
@@ -292,7 +292,7 @@ impl EmissionGuarantee for Bug {
292
292
DiagnosticBuilder {
293
293
inner : DiagnosticBuilderInner {
294
294
state : DiagnosticBuilderState :: Emittable ( handler) ,
295
- diagnostic : Box :: new ( Diagnostic :: new_with_code ( Level :: Bug , None , msg) ) ,
295
+ diagnostic : Box :: new ( Diagnostic :: new ( Level :: Bug , msg) ) ,
296
296
} ,
297
297
_marker : PhantomData ,
298
298
}
@@ -322,7 +322,7 @@ impl EmissionGuarantee for ! {
322
322
DiagnosticBuilder {
323
323
inner : DiagnosticBuilderInner {
324
324
state : DiagnosticBuilderState :: Emittable ( handler) ,
325
- diagnostic : Box :: new ( Diagnostic :: new_with_code ( Level :: Fatal , None , msg) ) ,
325
+ diagnostic : Box :: new ( Diagnostic :: new ( Level :: Fatal , msg) ) ,
326
326
} ,
327
327
_marker : PhantomData ,
328
328
}
@@ -352,7 +352,7 @@ impl EmissionGuarantee for rustc_span::fatal_error::FatalError {
352
352
DiagnosticBuilder {
353
353
inner : DiagnosticBuilderInner {
354
354
state : DiagnosticBuilderState :: Emittable ( handler) ,
355
- diagnostic : Box :: new ( Diagnostic :: new_with_code ( Level :: Fatal , None , msg) ) ,
355
+ diagnostic : Box :: new ( Diagnostic :: new ( Level :: Fatal , msg) ) ,
356
356
} ,
357
357
_marker : PhantomData ,
358
358
}
0 commit comments