]> git.lizzy.rs Git - rust.git/commitdiff
made multiline macro calls into single line
authorJake Vossen <jake@vossen.dev>
Fri, 2 Oct 2020 21:08:01 +0000 (15:08 -0600)
committerJake Vossen <jake@vossen.dev>
Fri, 2 Oct 2020 21:08:01 +0000 (15:08 -0600)
compiler/rustc_middle/src/ty/print/pretty.rs

index 610eb2cddbe6fcb57d4e8ea8a6ed3408d9d346c9..c95316c96abc4ca60d5b9783e53901cacf825464 100644 (file)
@@ -530,7 +530,7 @@ fn pretty_print_type(mut self, ty: Ty<'tcx>) -> Result<Self::Type, Self::Error>
             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 @@ pub fn print_only_trait_path(self) -> ty::Binder<TraitRefPrintOnlyTraitPath<'tcx
             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")
             }
         }
     }