about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic_builder.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs
index 1366ef52261..354fe1da2c9 100644
--- a/compiler/rustc_errors/src/diagnostic_builder.rs
+++ b/compiler/rustc_errors/src/diagnostic_builder.rs
@@ -188,7 +188,7 @@ impl<'a> DiagnosticBuilder<'a, ()> {
         level: Level,
         message: M,
     ) -> Self {
-        let diagnostic = Diagnostic::new_with_code(level, None, message);
+        let diagnostic = Diagnostic::new(level, message);
         Self::new_diagnostic(handler, diagnostic)
     }
 
@@ -257,7 +257,7 @@ impl EmissionGuarantee for Noted {
         DiagnosticBuilder {
             inner: DiagnosticBuilderInner {
                 state: DiagnosticBuilderState::Emittable(handler),
-                diagnostic: Box::new(Diagnostic::new_with_code(Level::Note, None, msg)),
+                diagnostic: Box::new(Diagnostic::new(Level::Note, msg)),
             },
             _marker: PhantomData,
         }
@@ -292,7 +292,7 @@ impl EmissionGuarantee for Bug {
         DiagnosticBuilder {
             inner: DiagnosticBuilderInner {
                 state: DiagnosticBuilderState::Emittable(handler),
-                diagnostic: Box::new(Diagnostic::new_with_code(Level::Bug, None, msg)),
+                diagnostic: Box::new(Diagnostic::new(Level::Bug, msg)),
             },
             _marker: PhantomData,
         }
@@ -322,7 +322,7 @@ impl EmissionGuarantee for ! {
         DiagnosticBuilder {
             inner: DiagnosticBuilderInner {
                 state: DiagnosticBuilderState::Emittable(handler),
-                diagnostic: Box::new(Diagnostic::new_with_code(Level::Fatal, None, msg)),
+                diagnostic: Box::new(Diagnostic::new(Level::Fatal, msg)),
             },
             _marker: PhantomData,
         }
@@ -352,7 +352,7 @@ impl EmissionGuarantee for rustc_span::fatal_error::FatalError {
         DiagnosticBuilder {
             inner: DiagnosticBuilderInner {
                 state: DiagnosticBuilderState::Emittable(handler),
-                diagnostic: Box::new(Diagnostic::new_with_code(Level::Fatal, None, msg)),
+                diagnostic: Box::new(Diagnostic::new(Level::Fatal, msg)),
             },
             _marker: PhantomData,
         }