about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-08-18 12:46:28 +0200
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-08-18 12:46:28 +0200
commit8f563226942570490ca77ea5ebfcc19fb3cf4089 (patch)
tree716cc8cb43f5dc5f91caf877d817c49d11236b40 /src/librustc_errors
parente0ba29c41396da831cd3d431f4484516eb4434ab (diff)
downloadrust-8f563226942570490ca77ea5ebfcc19fb3cf4089.tar.gz
rust-8f563226942570490ca77ea5ebfcc19fb3cf4089.zip
Add an additional empty line between the suggested `use` and the next item
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 3459771459a..26dda2dc42d 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -217,8 +217,10 @@ impl CodeSuggestion {
             if !buf.ends_with('\n') {
                 push_trailing(buf, prev_line.as_ref(), &prev_hi, None);
             }
-            // remove trailing newline
-            buf.pop();
+            // remove trailing newlines
+            while buf.ends_with('\n') {
+                buf.pop();
+            }
         }
         bufs
     }