]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/print/helpers.rs
Account for `ty::Error` when suggesting `impl Trait` or `Box<dyn Trait>`
[rust.git] / src / libsyntax / print / helpers.rs
index 3449e07f4562db823a55275f09ca40c59a15ccfa..88942cb7fd60f3272fa64c8859b3b9a3b4027d12 100644 (file)
@@ -1,5 +1,5 @@
-use std::borrow::Cow;
 use crate::print::pp::Printer;
+use std::borrow::Cow;
 
 impl Printer {
     pub fn word_space<W: Into<Cow<'static, str>>>(&mut self, w: W) {
@@ -22,10 +22,14 @@ pub fn hardbreak_if_not_bol(&mut self) {
     }
 
     pub fn space_if_not_bol(&mut self) {
-        if !self.is_beginning_of_line() { self.space(); }
+        if !self.is_beginning_of_line() {
+            self.space();
+        }
     }
 
-    pub fn nbsp(&mut self) { self.word(" ") }
+    pub fn nbsp(&mut self) {
+        self.word(" ")
+    }
 
     pub fn word_nbsp<S: Into<Cow<'static, str>>>(&mut self, w: S) {
         self.word(w);