about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJake Vossen <jake@vossen.dev>2020-10-02 15:08:01 -0600
committerJake Vossen <jake@vossen.dev>2020-10-02 15:08:01 -0600
commit3ea96b86ab8f2afec172bc7452876540388e4df9 (patch)
tree971e218a0d59b3bc953004e9509e6c6000fd1fbf
parentdffb9d6a26a29ea4cbad7df2371e004e7ae20269 (diff)
downloadrust-3ea96b86ab8f2afec172bc7452876540388e4df9.tar.gz
rust-3ea96b86ab8f2afec172bc7452876540388e4df9.zip
made multiline macro calls into single line
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs24
1 files changed, 6 insertions, 18 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index 610eb2cddbe..c95316c96ab 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -530,7 +530,7 @@ pub trait PrettyPrinter<'tcx>:
             ty::Ref(r, ty, mutbl) => {
                 p!("&");
                 if self.region_should_not_be_omitted(r) {
-                    p!(print(r), write(" "));
+                    p!(print(r), " ");
                 }
                 p!(print(ty::TypeAndMut { ty, mutbl }))
             }
@@ -2064,31 +2064,19 @@ define_print_and_forward_display! {
             ty::PredicateAtom::Projection(predicate) => p!(print(predicate)),
             ty::PredicateAtom::WellFormed(arg) => p!(print(arg), " well-formed"),
             ty::PredicateAtom::ObjectSafe(trait_def_id) => {
-                p!("the trait `",
-                print_def_path(trait_def_id, &[]),
-                "` is object-safe")
+                p!("the trait `", print_def_path(trait_def_id, &[]), "` is object-safe")
             }
             ty::PredicateAtom::ClosureKind(closure_def_id, _closure_substs, kind) => {
-                p!("the closure `",
-                print_value_path(closure_def_id, &[]),
-                write("` implements the trait `{}`", kind))
+                p!("the closure `", print_value_path(closure_def_id, &[]), write("` implements the trait `{}`", kind))
             }
             ty::PredicateAtom::ConstEvaluatable(def, substs) => {
-                p!("the constant `",
-                print_value_path(def.did, substs),
-                "` can be evaluated")
+                p!("the constant `", print_value_path(def.did, substs), "` can be evaluated")
             }
             ty::PredicateAtom::ConstEquate(c1, c2) => {
-                p!("the constant `",
-                print(c1),
-                "` equals `",
-                print(c2),
-                "`")
+                p!("the constant `", print(c1), "` equals `", print(c2), "`")
             }
             ty::PredicateAtom::TypeWellFormedFromEnv(ty) => {
-                p!("the type `",
-                print(ty),
-                "` is found in the environment")
+                p!("the type `", print(ty), "` is found in the environment")
             }
         }
     }