]> git.lizzy.rs Git - rust.git/blobdiff - src/missed_spans.rs
Fix #977
[rust.git] / src / missed_spans.rs
index 7e6d15166369ea88b0017c034add3c217824b353..5a737ebdee88329a48f8ad0c3d261f05d841f11a 100644 (file)
@@ -34,6 +34,12 @@ pub fn format_missing_with_indent(&mut self, end: BytePos) {
         })
     }
 
+    pub fn format_missing_no_indent(&mut self, end: BytePos) {
+        self.format_missing_inner(end, |this, last_snippet, _| {
+            this.buffer.push_str(last_snippet.trim_right());
+        })
+    }
+
     fn format_missing_inner<F: Fn(&mut FmtVisitor, &str, &str)>(&mut self,
                                                                 end: BytePos,
                                                                 process_last_snippet: F) {