]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_errors/diagnostic_builder.rs
Rollup merge of #69027 - TimDiekmann:zeroed-alloc, r=Amanieu
[rust.git] / src / librustc_errors / diagnostic_builder.rs
index 82bbae18a9c0b53c5dc5df7e93ba42a8375bb1e6..39f585231eea433c5e737871dae38c0e331001a8 100644 (file)
@@ -106,7 +106,11 @@ pub fn emit(&mut self) {
     ///
     /// See `emit` and `delay_as_bug` for details.
     pub fn emit_unless(&mut self, delay: bool) {
-        if delay { self.delay_as_bug() } else { self.emit() }
+        if delay {
+            self.delay_as_bug();
+        } else {
+            self.emit();
+        }
     }
 
     /// Stashes diagnostic for possible later improvement in a different,
@@ -369,6 +373,7 @@ pub fn allow_suggestions(&mut self, allow: bool) -> &mut Self {
     /// Creates a new `DiagnosticBuilder` with an already constructed
     /// diagnostic.
     crate fn new_diagnostic(handler: &'a Handler, diagnostic: Diagnostic) -> DiagnosticBuilder<'a> {
+        debug!("Created new diagnostic");
         DiagnosticBuilder(Box::new(DiagnosticBuilderInner {
             handler,
             diagnostic,