We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9deaf4 commit 375d8f1Copy full SHA for 375d8f1
compiler/rustc_errors/src/emitter.rs
@@ -2617,6 +2617,15 @@ impl Write for Buffy {
2617
}
2618
2619
2620
+impl Drop for Buffy {
2621
+ fn drop(&mut self) {
2622
+ if !self.buffer.is_empty() {
2623
+ self.flush().unwrap();
2624
+ panic!("buffers need to be flushed in order to print their contents");
2625
+ }
2626
2627
+}
2628
+
2629
impl WriteColor for Buffy {
2630
fn supports_color(&self) -> bool {
2631
self.buffer.supports_color()
0 commit comments