about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/emitter.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs
index e3b55a14133..e59d6c56750 100644
--- a/src/librustc_errors/emitter.rs
+++ b/src/librustc_errors/emitter.rs
@@ -1629,6 +1629,19 @@ impl EmitterWriter {
                             _ => ()
                         }
                     }
+                    if children.is_empty() && suggestions.iter().any(|s| {
+                        s.style != SuggestionStyle::CompletelyHidden
+                    }) {
+                        let mut buffer = StyledBuffer::new();
+                        if !self.short_message {
+                            draw_col_separator_no_space(&mut buffer, 0, max_line_num_len + 1);
+                        }
+                        match emit_to_destination(&buffer.render(), level, &mut self.dst,
+                                                self.short_message) {
+                            Ok(()) => (),
+                            Err(e) => panic!("failed to emit error: {}", e)
+                        }
+                    }
                     for sugg in suggestions {
                         if sugg.style == SuggestionStyle::CompletelyHidden {
                             // do not display this suggestion, it is meant only for tools