about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <ariel.byd@gmail.com>2016-04-05 22:56:23 +0300
committerAriel Ben-Yehuda <ariel.byd@gmail.com>2016-04-05 22:56:23 +0300
commitb23648fe4aa46e9a2bf72c6f68590e799c4cdb07 (patch)
treee18659acdf1159f1269a4d847cdf40f2c128a691
parent31247e5a0b38e2853cec47d30d0a48b2e54dd136 (diff)
downloadrust-b23648fe4aa46e9a2bf72c6f68590e799c4cdb07.tar.gz
rust-b23648fe4aa46e9a2bf72c6f68590e799c4cdb07.zip
improve the printing of substs and trait-refs
-rw-r--r--src/librustc/util/ppaux.rs194
-rw-r--r--src/test/compile-fail/associated-types-for-unimpl-trait.rs2
-rw-r--r--src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs2
-rw-r--r--src/test/compile-fail/associated-types-no-suitable-bound.rs2
-rw-r--r--src/test/compile-fail/associated-types-no-suitable-supertrait-2.rs2
-rw-r--r--src/test/compile-fail/associated-types-no-suitable-supertrait.rs4
-rw-r--r--src/test/compile-fail/associated-types-path-2.rs4
-rw-r--r--src/test/compile-fail/associated-types-unsized.rs2
-rw-r--r--src/test/compile-fail/bad-method-typaram-kind.rs2
-rw-r--r--src/test/compile-fail/bad-sized.rs6
-rw-r--r--src/test/compile-fail/builtin-superkinds-double-superkind.rs4
-rw-r--r--src/test/compile-fail/builtin-superkinds-in-metadata.rs2
-rw-r--r--src/test/compile-fail/builtin-superkinds-simple.rs2
-rw-r--r--src/test/compile-fail/builtin-superkinds-typaram-not-send.rs2
-rw-r--r--src/test/compile-fail/cast-rfc0401.rs4
-rw-r--r--src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs2
-rw-r--r--src/test/compile-fail/closure-bounds-subtype.rs2
-rw-r--r--src/test/compile-fail/cross-fn-cache-hole.rs2
-rw-r--r--src/test/compile-fail/deriving-no-inner-impl-error-message.rs2
-rw-r--r--src/test/compile-fail/deriving-span-Default-struct.rs2
-rw-r--r--src/test/compile-fail/destructure-trait-ref.rs2
-rw-r--r--src/test/compile-fail/dst-bad-assign-2.rs2
-rw-r--r--src/test/compile-fail/dst-bad-assign.rs2
-rw-r--r--src/test/compile-fail/dst-bad-coerce1.rs2
-rw-r--r--src/test/compile-fail/dst-bad-deep.rs2
-rw-r--r--src/test/compile-fail/dst-object-from-unsized-type.rs8
-rw-r--r--src/test/compile-fail/dst-sized-trait-param.rs4
-rw-r--r--src/test/compile-fail/extern-wrong-value-type.rs4
-rw-r--r--src/test/compile-fail/for-loop-bogosity.rs2
-rw-r--r--src/test/compile-fail/hrtb-just-for-static.rs2
-rw-r--r--src/test/compile-fail/hrtb-perfect-forwarding.rs2
-rw-r--r--src/test/compile-fail/ifmt-unimpl.rs2
-rw-r--r--src/test/compile-fail/impl-bounds-checking.rs2
-rw-r--r--src/test/compile-fail/indexing-requires-a-uint.rs2
-rw-r--r--src/test/compile-fail/issue-14084.rs2
-rw-r--r--src/test/compile-fail/issue-14366.rs2
-rw-r--r--src/test/compile-fail/issue-14853.rs2
-rw-r--r--src/test/compile-fail/issue-15756.rs2
-rw-r--r--src/test/compile-fail/issue-16538.rs2
-rw-r--r--src/test/compile-fail/issue-17651.rs2
-rw-r--r--src/test/compile-fail/issue-17718-static-sync.rs2
-rw-r--r--src/test/compile-fail/issue-17959.rs2
-rw-r--r--src/test/compile-fail/issue-18107.rs2
-rw-r--r--src/test/compile-fail/issue-18611.rs2
-rw-r--r--src/test/compile-fail/issue-18919.rs2
-rw-r--r--src/test/compile-fail/issue-1920-1.rs2
-rw-r--r--src/test/compile-fail/issue-1920-2.rs2
-rw-r--r--src/test/compile-fail/issue-1920-3.rs2
-rw-r--r--src/test/compile-fail/issue-20005.rs2
-rw-r--r--src/test/compile-fail/issue-20162.rs2
-rw-r--r--src/test/compile-fail/issue-20605.rs2
-rw-r--r--src/test/compile-fail/issue-21160.rs2
-rw-r--r--src/test/compile-fail/issue-21659-show-relevant-trait-impls-1.rs2
-rw-r--r--src/test/compile-fail/issue-21659-show-relevant-trait-impls-2.rs2
-rw-r--r--src/test/compile-fail/issue-21763.rs2
-rw-r--r--src/test/compile-fail/issue-22034.rs4
-rw-r--r--src/test/compile-fail/issue-25076.rs2
-rw-r--r--src/test/compile-fail/issue-2611-4.rs2
-rw-r--r--src/test/compile-fail/issue-28098.rs12
-rw-r--r--src/test/compile-fail/issue-29147.rs2
-rw-r--r--src/test/compile-fail/issue-5035-2.rs2
-rw-r--r--src/test/compile-fail/issue-5883.rs4
-rw-r--r--src/test/compile-fail/issue-7013.rs2
-rw-r--r--src/test/compile-fail/issue-7364.rs2
-rw-r--r--src/test/compile-fail/kindck-impl-type-params-2.rs2
-rw-r--r--src/test/compile-fail/kindck-send-unsafe.rs2
-rw-r--r--src/test/compile-fail/map-types.rs2
-rw-r--r--src/test/compile-fail/mutable-enum-indirect.rs2
-rw-r--r--src/test/compile-fail/no-send-res-ports.rs2
-rw-r--r--src/test/compile-fail/no_send-enum.rs2
-rw-r--r--src/test/compile-fail/no_send-rc.rs2
-rw-r--r--src/test/compile-fail/no_send-struct.rs2
-rw-r--r--src/test/compile-fail/no_share-enum.rs2
-rw-r--r--src/test/compile-fail/no_share-struct.rs2
-rw-r--r--src/test/compile-fail/not-sync.rs14
-rw-r--r--src/test/compile-fail/object-does-not-impl-trait.rs2
-rw-r--r--src/test/compile-fail/phantom-oibit.rs4
-rw-r--r--src/test/compile-fail/range-1.rs4
-rw-r--r--src/test/compile-fail/reject-specialized-drops-8142.rs2
-rw-r--r--src/test/compile-fail/repeat-to-run-dtor-twice.rs2
-rw-r--r--src/test/compile-fail/str-idx.rs2
-rw-r--r--src/test/compile-fail/str-mut-idx.rs8
-rw-r--r--src/test/compile-fail/substs-verbose.rs47
-rw-r--r--src/test/compile-fail/trait-bounds-impl-comparison-1.rs12
-rw-r--r--src/test/compile-fail/trait-bounds-impl-comparison-2.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-not-on-bare-trait.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-on-structs-and-enums.rs2
-rw-r--r--src/test/compile-fail/trait-coercion-generic-bad.rs2
-rw-r--r--src/test/compile-fail/trait-suggest-where-clause.rs22
-rw-r--r--src/test/compile-fail/traits-negative-impls.rs14
-rw-r--r--src/test/compile-fail/traits-repeated-supertrait-ambig.rs10
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-constituent-types-2.rs2
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-constituent-types.rs2
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-negation-send.rs2
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs6
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-negation.rs4
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-precedence.rs2
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-supertrait.rs4
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-trait-where-clause-2.rs2
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs2
-rw-r--r--src/test/compile-fail/typeck-unsafe-always-share.rs8
-rw-r--r--src/test/compile-fail/ufcs-qpath-self-mismatch.rs2
-rw-r--r--src/test/compile-fail/unsized-bare-typaram.rs2
-rw-r--r--src/test/compile-fail/unsized-enum.rs4
-rw-r--r--src/test/compile-fail/unsized-struct.rs4
-rw-r--r--src/test/compile-fail/unsized-trait-impl-trait-arg.rs2
-rw-r--r--src/test/compile-fail/unsized3.rs12
-rw-r--r--src/test/compile-fail/unsized5.rs12
-rw-r--r--src/test/compile-fail/unsized6.rs24
-rw-r--r--src/test/compile-fail/unsized7.rs2
-rw-r--r--src/test/compile-fail/vtable-res-trait-param.rs2
-rw-r--r--src/test/compile-fail/wf-impl-associated-type-trait.rs2
-rw-r--r--src/test/compile-fail/where-clause-constraints-are-local-for-inherent-impl.rs2
-rw-r--r--src/test/compile-fail/where-clause-constraints-are-local-for-trait-impl.rs2
-rw-r--r--src/test/compile-fail/where-clause-method-substituion.rs2
-rw-r--r--src/test/compile-fail/where-clauses-method-unsatisfied.rs2
-rw-r--r--src/test/compile-fail/where-clauses-unsatisfied.rs2
-rw-r--r--src/test/compile-fail/where-for-self-2.rs2
118 files changed, 350 insertions, 291 deletions
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs
index 20f16a1d255..b75f7965d1a 100644
--- a/src/librustc/util/ppaux.rs
+++ b/src/librustc/util/ppaux.rs
@@ -19,6 +19,7 @@ use ty::TyClosure;
 use ty::{TyBox, TyTrait, TyInt, TyUint, TyInfer};
 use ty::{self, Ty, TyCtxt, TypeFoldable};
 
+use std::cell::Cell;
 use std::fmt;
 use syntax::abi::Abi;
 use syntax::parse::token;
@@ -67,6 +68,45 @@ pub enum Ns {
     Value
 }
 
+fn number_of_supplied_defaults<'tcx, GG>(tcx: &ty::TyCtxt<'tcx>,
+                                         substs: &subst::Substs,
+                                         space: subst::ParamSpace,
+                                         get_generics: GG)
+                                         -> usize
+    where GG: FnOnce(&TyCtxt<'tcx>) -> ty::Generics<'tcx>
+{
+    let generics = get_generics(tcx);
+
+    let has_self = substs.self_ty().is_some();
+    let ty_params = generics.types.get_slice(space);
+    let tps = substs.types.get_slice(space);
+    if ty_params.last().map_or(false, |def| def.default.is_some()) {
+        let substs = tcx.lift(&substs);
+        ty_params.iter().zip(tps).rev().take_while(|&(def, &actual)| {
+            match def.default {
+                Some(default) => {
+                    if !has_self && default.has_self_ty() {
+                        // In an object type, there is no `Self`, and
+                        // thus if the default value references Self,
+                        // the user will be required to give an
+                        // explicit value. We can't even do the
+                        // substitution below to check without causing
+                        // an ICE. (#18956).
+                        false
+                    } else {
+                        let default = tcx.lift(&default);
+                        substs.and_then(|substs| default.subst(tcx, substs))
+                            == Some(actual)
+                    }
+                }
+                None => false
+            }
+        }).count()
+    } else {
+        0
+    }
+}
+
 pub fn parameterized<GG>(f: &mut fmt::Formatter,
                          substs: &subst::Substs,
                          did: DefId,
@@ -80,8 +120,8 @@ pub fn parameterized<GG>(f: &mut fmt::Formatter,
         write!(f, "<{} as ", self_ty)?;
     }
 
-    let (fn_trait_kind, verbose, last_name) = ty::tls::with(|tcx| {
-        let (did, last_name) = if ns == Ns::Value {
+    let (fn_trait_kind, verbose, item_name) = ty::tls::with(|tcx| {
+        let (did, item_name) = if ns == Ns::Value {
             // Try to get the impl/trait parent, if this is an
             // associated value item (method or constant).
             tcx.trait_of_item(did).or_else(|| tcx.impl_of_method(did))
@@ -90,97 +130,64 @@ pub fn parameterized<GG>(f: &mut fmt::Formatter,
             (did, None)
         };
         write!(f, "{}", tcx.item_path_str(did))?;
-        Ok((tcx.lang_items.fn_trait_kind(did), tcx.sess.verbose(), last_name))
+        Ok((tcx.lang_items.fn_trait_kind(did), tcx.sess.verbose(), item_name))
     })?;
 
-    let mut empty = true;
-    let mut start_or_continue = |f: &mut fmt::Formatter, start: &str, cont: &str| {
-        if empty {
-            empty = false;
-            write!(f, "{}", start)
-        } else {
-            write!(f, "{}", cont)
-        }
-    };
-
-    if verbose {
-        for region in &substs.regions {
-            start_or_continue(f, "<", ", ")?;
-            write!(f, "{:?}", region)?;
-        }
-        for &ty in &substs.types {
-            start_or_continue(f, "<", ", ")?;
-            write!(f, "{}", ty)?;
-        }
-        for projection in projections {
-            start_or_continue(f, "<", ", ")?;
-            write!(f, "{}={}",
-                   projection.projection_ty.item_name,
-                   projection.ty)?;
-        }
-        return start_or_continue(f, "", ">");
-    }
-
-    if fn_trait_kind.is_some() && projections.len() == 1 {
+    if !verbose && fn_trait_kind.is_some() && projections.len() == 1 {
         let projection_ty = projections[0].ty;
         if let TyTuple(ref args) = substs.types.get_slice(subst::TypeSpace)[0].sty {
             return fn_sig(f, args, false, ty::FnConverging(projection_ty));
         }
     }
 
-    for &r in &substs.regions {
-        start_or_continue(f, "<", ", ")?;
-        let s = r.to_string();
-        if s.is_empty() {
-            // This happens when the value of the region
-            // parameter is not easily serialized. This may be
-            // because the user omitted it in the first place,
-            // or because it refers to some block in the code,
-            // etc. I'm not sure how best to serialize this.
-            write!(f, "'_")?;
+    let empty = Cell::new(true);
+    let start_or_continue = |f: &mut fmt::Formatter, start: &str, cont: &str| {
+        if empty.get() {
+            empty.set(false);
+            write!(f, "{}", start)
         } else {
-            write!(f, "{}", s)?;
+            write!(f, "{}", cont)
         }
+    };
+    let print_region = |f: &mut fmt::Formatter, region: &ty::Region| -> _ {
+        if verbose {
+            write!(f, "{:?}", region)
+        } else {
+            let s = region.to_string();
+            if s.is_empty() {
+                // This happens when the value of the region
+                // parameter is not easily serialized. This may be
+                // because the user omitted it in the first place,
+                // or because it refers to some block in the code,
+                // etc. I'm not sure how best to serialize this.
+                write!(f, "'_")
+            } else {
+                write!(f, "{}", s)
+            }
+        }
+    };
+
+    for region in substs.regions.get_slice(subst::TypeSpace) {
+        start_or_continue(f, "<", ", ")?;
+        print_region(f, region)?;
     }
 
-    // It is important to execute this conditionally, only if -Z
-    // verbose is false. Otherwise, debug logs can sometimes cause
-    // ICEs trying to fetch the generics early in the pipeline. This
-    // is kind of a hacky workaround in that -Z verbose is required to
-    // avoid those ICEs.
+    let num_supplied_defaults = if verbose {
+        0
+    } else {
+        // It is important to execute this conditionally, only if -Z
+        // verbose is false. Otherwise, debug logs can sometimes cause
+        // ICEs trying to fetch the generics early in the pipeline. This
+        // is kind of a hacky workaround in that -Z verbose is required to
+        // avoid those ICEs.
+        ty::tls::with(|tcx| {
+            number_of_supplied_defaults(tcx, substs, subst::TypeSpace, get_generics)
+        })
+    };
+
     let tps = substs.types.get_slice(subst::TypeSpace);
-    let num_defaults = ty::tls::with(|tcx| {
-        let generics = get_generics(tcx);
-
-        let has_self = substs.self_ty().is_some();
-        let ty_params = generics.types.get_slice(subst::TypeSpace);
-        if ty_params.last().map_or(false, |def| def.default.is_some()) {
-            let substs = tcx.lift(&substs);
-            ty_params.iter().zip(tps).rev().take_while(|&(def, &actual)| {
-                match def.default {
-                    Some(default) => {
-                        if !has_self && default.has_self_ty() {
-                            // In an object type, there is no `Self`, and
-                            // thus if the default value references Self,
-                            // the user will be required to give an
-                            // explicit value. We can't even do the
-                            // substitution below to check without causing
-                            // an ICE. (#18956).
-                            false
-                        } else {
-                            let default = tcx.lift(&default);
-                            substs.and_then(|substs| default.subst(tcx, substs)) == Some(actual)
-                        }
-                    }
-                    None => false
-                }
-            }).count()
-        } else {
-            0
-        }
-    });
 
-    for &ty in &tps[..tps.len() - num_defaults] {
+    for &ty in &tps[..tps.len() - num_supplied_defaults] {
         start_or_continue(f, "<", ", ")?;
         write!(f, "{}", ty)?;
     }
@@ -196,21 +203,28 @@ pub fn parameterized<GG>(f: &mut fmt::Formatter,
 
     // For values, also print their name and type parameters.
     if ns == Ns::Value {
+        empty.set(true);
+
         if substs.self_ty().is_some() {
             write!(f, ">")?;
         }
 
-        if let Some(name) = last_name {
-            write!(f, "::{}", name)?;
+        if let Some(item_name) = item_name {
+            write!(f, "::{}", item_name)?;
         }
-        let tps = substs.types.get_slice(subst::FnSpace);
-        if !tps.is_empty() {
-            write!(f, "::<{}", tps[0])?;
-            for ty in &tps[1..] {
-                write!(f, ", {}", ty)?;
-            }
-            write!(f, ">")?;
+
+        for region in substs.regions.get_slice(subst::FnSpace) {
+            start_or_continue(f, "::<", ", ")?;
+            print_region(f, region)?;
+        }
+
+        // FIXME: consider being smart with defaults here too
+        for ty in substs.types.get_slice(subst::FnSpace) {
+            start_or_continue(f, "::<", ", ")?;
+            write!(f, "{}", ty)?;
         }
+
+        start_or_continue(f, "", ">")?;
     }
 
     Ok(())
@@ -997,9 +1011,7 @@ impl<'tcx> fmt::Debug for ty::TraitPredicate<'tcx> {
 
 impl<'tcx> fmt::Display for ty::TraitPredicate<'tcx> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{} : {}",
-               self.trait_ref.self_ty(),
-               self.trait_ref)
+        write!(f, "{}: {}", self.trait_ref.self_ty(), self.trait_ref)
     }
 }
 
diff --git a/src/test/compile-fail/associated-types-for-unimpl-trait.rs b/src/test/compile-fail/associated-types-for-unimpl-trait.rs
index 9fa24850e03..a6fcb9cff13 100644
--- a/src/test/compile-fail/associated-types-for-unimpl-trait.rs
+++ b/src/test/compile-fail/associated-types-for-unimpl-trait.rs
@@ -15,7 +15,7 @@ trait Get {
 
 trait Other {
     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
-    //~^ ERROR the trait bound `Self : Get` is not satisfied
+    //~^ ERROR the trait bound `Self: Get` is not satisfied
 }
 
 fn main() {
diff --git a/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs b/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs
index 18d9ea52ff2..83726a1676d 100644
--- a/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs
+++ b/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs
@@ -18,7 +18,7 @@ trait Foo<T> {
 
 fn f<T:Foo<isize>>(t: &T) {
     let u: <T as Foo<usize>>::Bar = t.get_bar();
-    //~^ ERROR the trait bound `T : Foo<usize>` is not satisfied
+    //~^ ERROR the trait bound `T: Foo<usize>` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/associated-types-no-suitable-bound.rs b/src/test/compile-fail/associated-types-no-suitable-bound.rs
index 0aafd193c90..baf56ffec86 100644
--- a/src/test/compile-fail/associated-types-no-suitable-bound.rs
+++ b/src/test/compile-fail/associated-types-no-suitable-bound.rs
@@ -19,7 +19,7 @@ struct Struct {
 
 impl Struct {
     fn uhoh<T>(foo: <T as Get>::Value) {}
-    //~^ ERROR the trait bound `T : Get` is not satisfied
+    //~^ ERROR the trait bound `T: Get` is not satisfied
 }
 
 fn main() {
diff --git a/src/test/compile-fail/associated-types-no-suitable-supertrait-2.rs b/src/test/compile-fail/associated-types-no-suitable-supertrait-2.rs
index 225ee085701..e0f0f3c47ae 100644
--- a/src/test/compile-fail/associated-types-no-suitable-supertrait-2.rs
+++ b/src/test/compile-fail/associated-types-no-suitable-supertrait-2.rs
@@ -25,7 +25,7 @@ trait Get {
 
 trait Other {
     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
-    //~^ ERROR the trait bound `Self : Get` is not satisfied
+    //~^ ERROR the trait bound `Self: Get` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/associated-types-no-suitable-supertrait.rs b/src/test/compile-fail/associated-types-no-suitable-supertrait.rs
index fe519beef67..ec38595e8fe 100644
--- a/src/test/compile-fail/associated-types-no-suitable-supertrait.rs
+++ b/src/test/compile-fail/associated-types-no-suitable-supertrait.rs
@@ -25,12 +25,12 @@ trait Get {
 
 trait Other {
     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
-    //~^ ERROR the trait bound `Self : Get` is not satisfied
+    //~^ ERROR the trait bound `Self: Get` is not satisfied
 }
 
 impl<T:Get> Other for T {
     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
-    //~^ ERROR the trait bound `(T, U) : Get` is not satisfied
+    //~^ ERROR the trait bound `(T, U): Get` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/associated-types-path-2.rs b/src/test/compile-fail/associated-types-path-2.rs
index ee228899bb3..0c077e37e43 100644
--- a/src/test/compile-fail/associated-types-path-2.rs
+++ b/src/test/compile-fail/associated-types-path-2.rs
@@ -38,12 +38,12 @@ pub fn f1_int_uint() {
 
 pub fn f1_uint_uint() {
     f1(2u32, 4u32);
-    //~^ ERROR `u32 : Foo` is not satisfied
+    //~^ ERROR `u32: Foo` is not satisfied
 }
 
 pub fn f1_uint_int() {
     f1(2u32, 4i32);
-    //~^ ERROR `u32 : Foo` is not satisfied
+    //~^ ERROR `u32: Foo` is not satisfied
 }
 
 pub fn f2_int() {
diff --git a/src/test/compile-fail/associated-types-unsized.rs b/src/test/compile-fail/associated-types-unsized.rs
index 468b40e6971..f1827022964 100644
--- a/src/test/compile-fail/associated-types-unsized.rs
+++ b/src/test/compile-fail/associated-types-unsized.rs
@@ -14,7 +14,7 @@ trait Get {
 }
 
 fn foo<T:Get>(t: T) {
-    let x = t.get(); //~ ERROR `<T as Get>::Value : std::marker::Sized` is not
+    let x = t.get(); //~ ERROR `<T as Get>::Value: std::marker::Sized` is not
 }
 
 fn main() {
diff --git a/src/test/compile-fail/bad-method-typaram-kind.rs b/src/test/compile-fail/bad-method-typaram-kind.rs
index 4de6600f2d2..5be90f05018 100644
--- a/src/test/compile-fail/bad-method-typaram-kind.rs
+++ b/src/test/compile-fail/bad-method-typaram-kind.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 fn foo<T:'static>() {
-    1.bar::<T>(); //~ ERROR `T : std::marker::Send` is not satisfied
+    1.bar::<T>(); //~ ERROR `T: std::marker::Send` is not satisfied
 }
 
 trait bar {
diff --git a/src/test/compile-fail/bad-sized.rs b/src/test/compile-fail/bad-sized.rs
index d25d0081c56..f62404e60e6 100644
--- a/src/test/compile-fail/bad-sized.rs
+++ b/src/test/compile-fail/bad-sized.rs
@@ -12,7 +12,7 @@ trait Trait {}
 
 pub fn main() {
     let x: Vec<Trait + Sized> = Vec::new();
-    //~^ ERROR `Trait + Sized : std::marker::Sized` is not satisfied
-    //~| ERROR `Trait + Sized : std::marker::Sized` is not satisfied
-    //~| ERROR `Trait + Sized : std::marker::Sized` is not satisfied
+    //~^ ERROR `Trait + Sized: std::marker::Sized` is not satisfied
+    //~| ERROR `Trait + Sized: std::marker::Sized` is not satisfied
+    //~| ERROR `Trait + Sized: std::marker::Sized` is not satisfied
 }
diff --git a/src/test/compile-fail/builtin-superkinds-double-superkind.rs b/src/test/compile-fail/builtin-superkinds-double-superkind.rs
index 03ab94e5908..8d5d8e8dc9b 100644
--- a/src/test/compile-fail/builtin-superkinds-double-superkind.rs
+++ b/src/test/compile-fail/builtin-superkinds-double-superkind.rs
@@ -13,9 +13,9 @@
 
 trait Foo : Send+Sync { }
 
-impl <T: Sync+'static> Foo for (T,) { } //~ ERROR `T : std::marker::Send` is not satisfied
+impl <T: Sync+'static> Foo for (T,) { } //~ ERROR `T: std::marker::Send` is not satisfied
 
-impl <T: Send> Foo for (T,T) { } //~ ERROR `T : std::marker::Sync` is not satisfied
+impl <T: Send> Foo for (T,T) { } //~ ERROR `T: std::marker::Sync` is not satisfied
 
 impl <T: Send+Sync> Foo for (T,T,T) { } // (ok)
 
diff --git a/src/test/compile-fail/builtin-superkinds-in-metadata.rs b/src/test/compile-fail/builtin-superkinds-in-metadata.rs
index 1063280ea26..de2084c4e81 100644
--- a/src/test/compile-fail/builtin-superkinds-in-metadata.rs
+++ b/src/test/compile-fail/builtin-superkinds-in-metadata.rs
@@ -22,6 +22,6 @@ struct X<T>(T);
 impl <T:Sync> RequiresShare for X<T> { }
 
 impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
-//~^ ERROR `T : std::marker::Send` is not satisfied
+//~^ ERROR `T: std::marker::Send` is not satisfied
 
 fn main() { }
diff --git a/src/test/compile-fail/builtin-superkinds-simple.rs b/src/test/compile-fail/builtin-superkinds-simple.rs
index 40625fc82aa..6dc5f39cb30 100644
--- a/src/test/compile-fail/builtin-superkinds-simple.rs
+++ b/src/test/compile-fail/builtin-superkinds-simple.rs
@@ -14,6 +14,6 @@
 trait Foo : Send { }
 
 impl Foo for std::rc::Rc<i8> { }
-//~^ ERROR `std::rc::Rc<i8> : std::marker::Send` is not satisfied
+//~^ ERROR `std::rc::Rc<i8>: std::marker::Send` is not satisfied
 
 fn main() { }
diff --git a/src/test/compile-fail/builtin-superkinds-typaram-not-send.rs b/src/test/compile-fail/builtin-superkinds-typaram-not-send.rs
index 7e05c6462ff..d4bb8de13d0 100644
--- a/src/test/compile-fail/builtin-superkinds-typaram-not-send.rs
+++ b/src/test/compile-fail/builtin-superkinds-typaram-not-send.rs
@@ -12,6 +12,6 @@
 
 trait Foo : Send { }
 
-impl <T: Sync+'static> Foo for T { } //~ ERROR `T : std::marker::Send` is not satisfied
+impl <T: Sync+'static> Foo for T { } //~ ERROR `T: std::marker::Send` is not satisfied
 
 fn main() { }
diff --git a/src/test/compile-fail/cast-rfc0401.rs b/src/test/compile-fail/cast-rfc0401.rs
index c032fb43402..dcd49e34bb2 100644
--- a/src/test/compile-fail/cast-rfc0401.rs
+++ b/src/test/compile-fail/cast-rfc0401.rs
@@ -91,7 +91,7 @@ fn main()
     let _ = 42usize as *const [u8]; //~ ERROR casting
     let _ = v as *const [u8]; //~ ERROR cannot cast
     let _ = fat_v as *const Foo;
-    //~^ ERROR the trait bound `[u8] : std::marker::Sized` is not satisfied
+    //~^ ERROR the trait bound `[u8]: std::marker::Sized` is not satisfied
     //~^^ HELP run `rustc --explain E0277` to see a detailed explanation
     //~^^^ NOTE `[u8]` does not have a constant size known at compile-time
     //~^^^^ NOTE required for the cast to the object type `Foo`
@@ -106,7 +106,7 @@ fn main()
 
     let a : *const str = "hello";
     let _ = a as *const Foo;
-    //~^ ERROR the trait bound `str : std::marker::Sized` is not satisfied
+    //~^ ERROR the trait bound `str: std::marker::Sized` is not satisfied
     //~^^ HELP run `rustc --explain E0277` to see a detailed explanation
     //~^^^ NOTE `str` does not have a constant size known at compile-time
     //~^^^^ NOTE required for the cast to the object type `Foo`
diff --git a/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs b/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs
index ed18ed62111..b9224e7be7f 100644
--- a/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs
+++ b/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs
@@ -13,7 +13,7 @@ struct X<F> where F: FnOnce() + 'static + Send {
 }
 
 fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
-    //~^ ERROR `F : std::marker::Send` is not satisfied
+    //~^ ERROR `F: std::marker::Send` is not satisfied
     return X { field: blk };
 }
 
diff --git a/src/test/compile-fail/closure-bounds-subtype.rs b/src/test/compile-fail/closure-bounds-subtype.rs
index b618cd07760..d3339c4845a 100644
--- a/src/test/compile-fail/closure-bounds-subtype.rs
+++ b/src/test/compile-fail/closure-bounds-subtype.rs
@@ -21,7 +21,7 @@ fn give_any<F>(f: F) where F: FnOnce() {
 
 fn give_owned<F>(f: F) where F: FnOnce() + Send {
     take_any(f);
-    take_const_owned(f); //~ ERROR `F : std::marker::Sync` is not satisfied
+    take_const_owned(f); //~ ERROR `F: std::marker::Sync` is not satisfied
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/cross-fn-cache-hole.rs b/src/test/compile-fail/cross-fn-cache-hole.rs
index 0a3ce03f27b..b034fedb805 100644
--- a/src/test/compile-fail/cross-fn-cache-hole.rs
+++ b/src/test/compile-fail/cross-fn-cache-hole.rs
@@ -23,7 +23,7 @@ trait Bar<X> { }
 
 // We don't always check where clauses for sanity, but in this case
 // wfcheck does report an error here:
-fn vacuous<A>() //~ ERROR the trait bound `i32 : Bar<u32>` is not satisfied
+fn vacuous<A>() //~ ERROR the trait bound `i32: Bar<u32>` is not satisfied
     where i32: Foo<u32, A>
 {
     // ... the original intention was to check that we don't use that
diff --git a/src/test/compile-fail/deriving-no-inner-impl-error-message.rs b/src/test/compile-fail/deriving-no-inner-impl-error-message.rs
index d767fc32636..129c859b919 100644
--- a/src/test/compile-fail/deriving-no-inner-impl-error-message.rs
+++ b/src/test/compile-fail/deriving-no-inner-impl-error-message.rs
@@ -18,7 +18,7 @@ struct E {
 #[derive(Clone)]
 struct C {
     x: NoCloneOrEq
-    //~^ ERROR `NoCloneOrEq : std::clone::Clone` is not satisfied
+    //~^ ERROR `NoCloneOrEq: std::clone::Clone` is not satisfied
 }
 
 
diff --git a/src/test/compile-fail/deriving-span-Default-struct.rs b/src/test/compile-fail/deriving-span-Default-struct.rs
index 6b81804e028..56fb3861173 100644
--- a/src/test/compile-fail/deriving-span-Default-struct.rs
+++ b/src/test/compile-fail/deriving-span-Default-struct.rs
@@ -17,7 +17,7 @@ struct Error;
 
 #[derive(Default)]
 struct Struct {
-    x: Error //~ ERROR `Error : std::default::Default` is not satisfied
+    x: Error //~ ERROR `Error: std::default::Default` is not satisfied
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs
index 3e6428c7d57..68d97957102 100644
--- a/src/test/compile-fail/destructure-trait-ref.rs
+++ b/src/test/compile-fail/destructure-trait-ref.rs
@@ -35,7 +35,7 @@ fn main() {
     // n == m
     let &x = &1isize as &T;      //~ ERROR type `&T` cannot be dereferenced
     let &&x = &(&1isize as &T);  //~ ERROR type `&T` cannot be dereferenced
-    let box x = box 1isize as Box<T>; //~ ERROR `T : std::marker::Sized` is not satisfied
+    let box x = box 1isize as Box<T>; //~ ERROR `T: std::marker::Sized` is not satisfied
 
     // n > m
     let &&x = &1isize as &T;
diff --git a/src/test/compile-fail/dst-bad-assign-2.rs b/src/test/compile-fail/dst-bad-assign-2.rs
index 6e2380da6a1..241fabf053c 100644
--- a/src/test/compile-fail/dst-bad-assign-2.rs
+++ b/src/test/compile-fail/dst-bad-assign-2.rs
@@ -44,5 +44,5 @@ pub fn main() {
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
     let z: Box<ToBar> = Box::new(Bar1 {f: 36});
     f5.ptr = *z;
-    //~^ ERROR `ToBar : std::marker::Sized` is not satisfied
+    //~^ ERROR `ToBar: std::marker::Sized` is not satisfied
 }
diff --git a/src/test/compile-fail/dst-bad-assign.rs b/src/test/compile-fail/dst-bad-assign.rs
index ab874d4e877..2d21d0ebc76 100644
--- a/src/test/compile-fail/dst-bad-assign.rs
+++ b/src/test/compile-fail/dst-bad-assign.rs
@@ -49,5 +49,5 @@ pub fn main() {
     //~| found `Bar1`
     //~| expected trait ToBar
     //~| found struct `Bar1`
-    //~| ERROR `ToBar : std::marker::Sized` is not satisfied
+    //~| ERROR `ToBar: std::marker::Sized` is not satisfied
 }
diff --git a/src/test/compile-fail/dst-bad-coerce1.rs b/src/test/compile-fail/dst-bad-coerce1.rs
index 2413bbae84c..9a3ea54a3a4 100644
--- a/src/test/compile-fail/dst-bad-coerce1.rs
+++ b/src/test/compile-fail/dst-bad-coerce1.rs
@@ -28,5 +28,5 @@ pub fn main() {
     let f1 = Fat { ptr: Foo };
     let f2: &Fat<Foo> = &f1;
     let f3: &Fat<Bar> = f2;
-    //~^ ERROR `Foo : Bar` is not satisfied
+    //~^ ERROR `Foo: Bar` is not satisfied
 }
diff --git a/src/test/compile-fail/dst-bad-deep.rs b/src/test/compile-fail/dst-bad-deep.rs
index 0b9d99396f7..f508364d751 100644
--- a/src/test/compile-fail/dst-bad-deep.rs
+++ b/src/test/compile-fail/dst-bad-deep.rs
@@ -21,5 +21,5 @@ pub fn main() {
     let f: Fat<[isize; 3]> = Fat { ptr: [5, 6, 7] };
     let g: &Fat<[isize]> = &f;
     let h: &Fat<Fat<[isize]>> = &Fat { ptr: *g };
-    //~^ ERROR `[isize] : std::marker::Sized` is not satisfied
+    //~^ ERROR `[isize]: std::marker::Sized` is not satisfied
 }
diff --git a/src/test/compile-fail/dst-object-from-unsized-type.rs b/src/test/compile-fail/dst-object-from-unsized-type.rs
index 36bd1a98ca9..8fafd78d407 100644
--- a/src/test/compile-fail/dst-object-from-unsized-type.rs
+++ b/src/test/compile-fail/dst-object-from-unsized-type.rs
@@ -16,22 +16,22 @@ impl Foo for [u8] {}
 
 fn test1<T: ?Sized + Foo>(t: &T) {
     let u: &Foo = t;
-    //~^ ERROR `T : std::marker::Sized` is not satisfied
+    //~^ ERROR `T: std::marker::Sized` is not satisfied
 }
 
 fn test2<T: ?Sized + Foo>(t: &T) {
     let v: &Foo = t as &Foo;
-    //~^ ERROR `T : std::marker::Sized` is not satisfied
+    //~^ ERROR `T: std::marker::Sized` is not satisfied
 }
 
 fn test3() {
     let _: &[&Foo] = &["hi"];
-    //~^ ERROR `str : std::marker::Sized` is not satisfied
+    //~^ ERROR `str: std::marker::Sized` is not satisfied
 }
 
 fn test4(x: &[u8]) {
     let _: &Foo = x as &Foo;
-    //~^ ERROR `[u8] : std::marker::Sized` is not satisfied
+    //~^ ERROR `[u8]: std::marker::Sized` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/dst-sized-trait-param.rs b/src/test/compile-fail/dst-sized-trait-param.rs
index 37500871563..bd5fd3ee3b7 100644
--- a/src/test/compile-fail/dst-sized-trait-param.rs
+++ b/src/test/compile-fail/dst-sized-trait-param.rs
@@ -15,9 +15,9 @@
 trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
 
 impl Foo<[isize]> for usize { }
-//~^ ERROR `[isize] : std::marker::Sized` is not satisfied
+//~^ ERROR `[isize]: std::marker::Sized` is not satisfied
 
 impl Foo<isize> for [usize] { }
-//~^ ERROR `[usize] : std::marker::Sized` is not satisfied
+//~^ ERROR `[usize]: std::marker::Sized` is not satisfied
 
 pub fn main() { }
diff --git a/src/test/compile-fail/extern-wrong-value-type.rs b/src/test/compile-fail/extern-wrong-value-type.rs
index 89ed960c891..576368aef31 100644
--- a/src/test/compile-fail/extern-wrong-value-type.rs
+++ b/src/test/compile-fail/extern-wrong-value-type.rs
@@ -17,6 +17,6 @@ fn main() {
     // extern functions are extern "C" fn
     let _x: extern "C" fn() = f; // OK
     is_fn(f);
-    //~^ ERROR `extern "C" fn() {f} : std::ops::Fn<()>` is not satisfied
-    //~| ERROR `extern "C" fn() {f} : std::ops::FnOnce<()>` is not satisfied
+    //~^ ERROR `extern "C" fn() {f}: std::ops::Fn<()>` is not satisfied
+    //~| ERROR `extern "C" fn() {f}: std::ops::FnOnce<()>` is not satisfied
 }
diff --git a/src/test/compile-fail/for-loop-bogosity.rs b/src/test/compile-fail/for-loop-bogosity.rs
index 8b127ca1795..96ad184fd35 100644
--- a/src/test/compile-fail/for-loop-bogosity.rs
+++ b/src/test/compile-fail/for-loop-bogosity.rs
@@ -24,7 +24,7 @@ pub fn main() {
         x: 1,
         y: 2,
     };
-    for x in bogus { //~ ERROR `MyStruct : std::iter::Iterator`
+    for x in bogus { //~ ERROR `MyStruct: std::iter::Iterator` is not satisfied
         drop(x);
     }
 }
diff --git a/src/test/compile-fail/hrtb-just-for-static.rs b/src/test/compile-fail/hrtb-just-for-static.rs
index 270e6b9f183..aec950f992c 100644
--- a/src/test/compile-fail/hrtb-just-for-static.rs
+++ b/src/test/compile-fail/hrtb-just-for-static.rs
@@ -31,7 +31,7 @@ fn give_any() {
 struct StaticInt;
 impl Foo<&'static isize> for StaticInt { }
 fn give_static() {
-    want_hrtb::<StaticInt>() //~ ERROR `for<'a> StaticInt : Foo<&'a isize>` is not satisfied
+    want_hrtb::<StaticInt>() //~ ERROR `for<'a> StaticInt: Foo<&'a isize>` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/hrtb-perfect-forwarding.rs b/src/test/compile-fail/hrtb-perfect-forwarding.rs
index 24e59e6c29e..fcfbeefced0 100644
--- a/src/test/compile-fail/hrtb-perfect-forwarding.rs
+++ b/src/test/compile-fail/hrtb-perfect-forwarding.rs
@@ -53,7 +53,7 @@ fn foo_hrtb_bar_not<'b,T>(mut t: T)
     // be implemented. Thus to satisfy `&mut T : for<'a> Foo<&'a
     // isize>`, we require `T : for<'a> Bar<&'a isize>`, but the where
     // clause only specifies `T : Bar<&'b isize>`.
-    foo_hrtb_bar_not(&mut t); //~ ERROR `for<'a> T : Bar<&'a isize>` is not satisfied
+    foo_hrtb_bar_not(&mut t); //~ ERROR `for<'a> T: Bar<&'a isize>` is not satisfied
 }
 
 fn foo_hrtb_bar_hrtb<T>(mut t: T)
diff --git a/src/test/compile-fail/ifmt-unimpl.rs b/src/test/compile-fail/ifmt-unimpl.rs
index dd14d0c9154..9b9bae92c33 100644
--- a/src/test/compile-fail/ifmt-unimpl.rs
+++ b/src/test/compile-fail/ifmt-unimpl.rs
@@ -10,5 +10,5 @@
 
 fn main() {
     format!("{:X}", "3");
-    //~^ ERROR: `str : std::fmt::UpperHex` is not satisfied
+    //~^ ERROR: `str: std::fmt::UpperHex` is not satisfied
 }
diff --git a/src/test/compile-fail/impl-bounds-checking.rs b/src/test/compile-fail/impl-bounds-checking.rs
index 12696585a9e..f90365b71ae 100644
--- a/src/test/compile-fail/impl-bounds-checking.rs
+++ b/src/test/compile-fail/impl-bounds-checking.rs
@@ -17,7 +17,7 @@ trait Getter<T: Clone2> {
     fn get(&self) -> T;
 }
 
-impl Getter<isize> for isize { //~ ERROR `isize : Clone2` is not satisfied
+impl Getter<isize> for isize { //~ ERROR `isize: Clone2` is not satisfied
     fn get(&self) -> isize { *self }
 }
 
diff --git a/src/test/compile-fail/indexing-requires-a-uint.rs b/src/test/compile-fail/indexing-requires-a-uint.rs
index f8979686038..354d7b93648 100644
--- a/src/test/compile-fail/indexing-requires-a-uint.rs
+++ b/src/test/compile-fail/indexing-requires-a-uint.rs
@@ -13,7 +13,7 @@
 
 fn main() {
     fn bar<T>(_: T) {}
-    [0][0u8]; //~ ERROR: `[_] : std::ops::Index<u8>` is not satisfied
+    [0][0u8]; //~ ERROR: `[_]: std::ops::Index<u8>` is not satisfied
 
     [0][0]; // should infer to be a usize
 
diff --git a/src/test/compile-fail/issue-14084.rs b/src/test/compile-fail/issue-14084.rs
index 20da46dcaa2..446514c8dd4 100644
--- a/src/test/compile-fail/issue-14084.rs
+++ b/src/test/compile-fail/issue-14084.rs
@@ -13,5 +13,5 @@
 
 fn main() {
     () <- 0;
-    //~^ ERROR: `() : std::ops::Placer<_>` is not satisfied
+    //~^ ERROR: `(): std::ops::Placer<_>` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-14366.rs b/src/test/compile-fail/issue-14366.rs
index 6f4e9887dc6..84452accc9a 100644
--- a/src/test/compile-fail/issue-14366.rs
+++ b/src/test/compile-fail/issue-14366.rs
@@ -10,5 +10,5 @@
 
 fn main() {
     let _x = "test" as &::std::any::Any;
-//~^ ERROR `str : std::marker::Sized` is not satisfied
+//~^ ERROR `str: std::marker::Sized` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-14853.rs b/src/test/compile-fail/issue-14853.rs
index c6c1a0fd177..c4d88267032 100644
--- a/src/test/compile-fail/issue-14853.rs
+++ b/src/test/compile-fail/issue-14853.rs
@@ -20,7 +20,7 @@ struct X { data: u32 }
 
 impl Something for X {
     fn yay<T: Str>(_:Option<X>, thing: &[T]) {
-    //~^ ERROR the requirement `T : Str` appears on the impl method
+    //~^ ERROR the requirement `T: Str` appears on the impl method
     }
 }
 
diff --git a/src/test/compile-fail/issue-15756.rs b/src/test/compile-fail/issue-15756.rs
index 790000a3f92..41349d7d744 100644
--- a/src/test/compile-fail/issue-15756.rs
+++ b/src/test/compile-fail/issue-15756.rs
@@ -15,7 +15,7 @@ fn dft_iter<'a, T>(arg1: Chunks<'a,T>, arg2: ChunksMut<'a,T>)
 {
     for
     &mut something
-//~^ ERROR `[T] : std::marker::Sized` is not satisfied
+//~^ ERROR `[T]: std::marker::Sized` is not satisfied
     in arg2
     {
     }
diff --git a/src/test/compile-fail/issue-16538.rs b/src/test/compile-fail/issue-16538.rs
index 79d2224aad6..6c41450796c 100644
--- a/src/test/compile-fail/issue-16538.rs
+++ b/src/test/compile-fail/issue-16538.rs
@@ -19,7 +19,7 @@ mod Y {
 }
 
 static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
-//~^ ERROR `*const usize : std::marker::Sync` is not satisfied
+//~^ ERROR `*const usize: std::marker::Sync` is not satisfied
 //~| ERROR cannot refer to other statics by value, use the address-of operator or a constant instead
 //~| ERROR E0015
 
diff --git a/src/test/compile-fail/issue-17651.rs b/src/test/compile-fail/issue-17651.rs
index edd9b6e0c06..0fe01ece558 100644
--- a/src/test/compile-fail/issue-17651.rs
+++ b/src/test/compile-fail/issue-17651.rs
@@ -14,5 +14,5 @@
 fn main() {
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
     (|| Box::new(*(&[0][..])))();
-    //~^ ERROR `[_] : std::marker::Sized` is not satisfied
+    //~^ ERROR `[_]: std::marker::Sized` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-17718-static-sync.rs b/src/test/compile-fail/issue-17718-static-sync.rs
index 1bb3b794135..790329cd2e4 100644
--- a/src/test/compile-fail/issue-17718-static-sync.rs
+++ b/src/test/compile-fail/issue-17718-static-sync.rs
@@ -17,6 +17,6 @@ impl !Sync for Foo {}
 
 static FOO: usize = 3;
 static BAR: Foo = Foo;
-//~^ ERROR: `Foo : std::marker::Sync` is not satisfied
+//~^ ERROR: `Foo: std::marker::Sync` is not satisfied
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-17959.rs b/src/test/compile-fail/issue-17959.rs
index 56a66ecc8aa..23be4d35361 100644
--- a/src/test/compile-fail/issue-17959.rs
+++ b/src/test/compile-fail/issue-17959.rs
@@ -19,7 +19,7 @@ struct G<T: ?Sized> {
 }
 
 impl<T> Drop for G<T> {
-//~^ ERROR: The requirement `T : core::marker::Sized` is added only by the Drop impl. [E0367]
+//~^ ERROR: The requirement `T: core::marker::Sized` is added only by the Drop impl. [E0367]
     fn drop(&mut self) {
         if !self._ptr.is_null() {
         }
diff --git a/src/test/compile-fail/issue-18107.rs b/src/test/compile-fail/issue-18107.rs
index 6b40811bf04..33d68c121bf 100644
--- a/src/test/compile-fail/issue-18107.rs
+++ b/src/test/compile-fail/issue-18107.rs
@@ -12,7 +12,7 @@ pub trait AbstractRenderer {}
 
 fn _create_render(_: &()) ->
     AbstractRenderer
-//~^ ERROR: `AbstractRenderer + 'static : std::marker::Sized` is not satisfied
+//~^ ERROR: `AbstractRenderer + 'static: std::marker::Sized` is not satisfied
 {
     match 0 {
         _ => unimplemented!()
diff --git a/src/test/compile-fail/issue-18611.rs b/src/test/compile-fail/issue-18611.rs
index 5318b18be5c..a3ad76e1be0 100644
--- a/src/test/compile-fail/issue-18611.rs
+++ b/src/test/compile-fail/issue-18611.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 fn add_state(op: <isize as HasState>::State) {
-//~^ ERROR `isize : HasState` is not satisfied
+//~^ ERROR `isize: HasState` is not satisfied
 }
 
 trait HasState {
diff --git a/src/test/compile-fail/issue-18919.rs b/src/test/compile-fail/issue-18919.rs
index 2742162de53..3e21360721b 100644
--- a/src/test/compile-fail/issue-18919.rs
+++ b/src/test/compile-fail/issue-18919.rs
@@ -11,7 +11,7 @@
 type FuncType<'f> = Fn(&isize) -> isize + 'f;
 
 fn ho_func(f: Option<FuncType>) {
-    //~^ ERROR: `for<'r> std::ops::Fn(&'r isize) -> isize : std::marker::Sized` is not satisfied
+    //~^ ERROR: `for<'r> std::ops::Fn(&'r isize) -> isize: std::marker::Sized` is not satisfied
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-1920-1.rs b/src/test/compile-fail/issue-1920-1.rs
index f37693d8a58..8fbe4432204 100644
--- a/src/test/compile-fail/issue-1920-1.rs
+++ b/src/test/compile-fail/issue-1920-1.rs
@@ -18,5 +18,5 @@ fn assert_clone<T>() where T : Clone { }
 
 fn main() {
     assert_clone::<foo::core::sync::atomic::AtomicBool>();
-    //~^ ERROR `foo::core::sync::atomic::AtomicBool : foo::core::clone::Clone` is not satisfied
+    //~^ ERROR `foo::core::sync::atomic::AtomicBool: foo::core::clone::Clone` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-1920-2.rs b/src/test/compile-fail/issue-1920-2.rs
index c8d7bcaecf9..02c925f336e 100644
--- a/src/test/compile-fail/issue-1920-2.rs
+++ b/src/test/compile-fail/issue-1920-2.rs
@@ -16,5 +16,5 @@ fn assert_clone<T>() where T : Clone { }
 
 fn main() {
     assert_clone::<bar::sync::atomic::AtomicBool>();
-    //~^ ERROR `bar::sync::atomic::AtomicBool : bar::clone::Clone` is not satisfied
+    //~^ ERROR `bar::sync::atomic::AtomicBool: bar::clone::Clone` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-1920-3.rs b/src/test/compile-fail/issue-1920-3.rs
index c0252deda24..dfec48e0a83 100644
--- a/src/test/compile-fail/issue-1920-3.rs
+++ b/src/test/compile-fail/issue-1920-3.rs
@@ -20,5 +20,5 @@ fn assert_clone<T>() where T : Clone { }
 
 fn main() {
     assert_clone::<foo::core::sync::atomic::AtomicBool>();
-    //~^ ERROR `core::sync::atomic::AtomicBool : core::clone::Clone` is not satisfied
+    //~^ ERROR `core::sync::atomic::AtomicBool: core::clone::Clone` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-20005.rs b/src/test/compile-fail/issue-20005.rs
index a54fc0a314b..b02757fb5a3 100644
--- a/src/test/compile-fail/issue-20005.rs
+++ b/src/test/compile-fail/issue-20005.rs
@@ -15,7 +15,7 @@ trait From<Src> {
 }
 
 trait To {
-    fn to<Dst>(  //~ ERROR `Self : std::marker::Sized` is not satisfied
+    fn to<Dst>(  //~ ERROR `Self: std::marker::Sized` is not satisfied
         self
     ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
         From::from(self)
diff --git a/src/test/compile-fail/issue-20162.rs b/src/test/compile-fail/issue-20162.rs
index 5e60e2a36f6..b2f3a2da516 100644
--- a/src/test/compile-fail/issue-20162.rs
+++ b/src/test/compile-fail/issue-20162.rs
@@ -13,5 +13,5 @@ struct X { x: i32 }
 fn main() {
     let mut b: Vec<X> = vec![];
     b.sort();
-    //~^ ERROR `X : std::cmp::Ord` is not satisfied
+    //~^ ERROR `X: std::cmp::Ord` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-20605.rs b/src/test/compile-fail/issue-20605.rs
index 2634370fe90..b7c544c7848 100644
--- a/src/test/compile-fail/issue-20605.rs
+++ b/src/test/compile-fail/issue-20605.rs
@@ -10,7 +10,7 @@
 
 fn changer<'a>(mut things: Box<Iterator<Item=&'a mut u8>>) {
     for item in *things { *item = 0 }
-//~^ ERROR `std::iter::Iterator<Item=&mut u8> : std::marker::Sized` is not satisfied
+//~^ ERROR `std::iter::Iterator<Item=&mut u8>: std::marker::Sized` is not satisfied
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-21160.rs b/src/test/compile-fail/issue-21160.rs
index 7d9ae0543c7..0de0ab2269b 100644
--- a/src/test/compile-fail/issue-21160.rs
+++ b/src/test/compile-fail/issue-21160.rs
@@ -16,6 +16,6 @@ impl Bar {
 
 #[derive(Hash)]
 struct Foo(Bar);
-//~^ error: `Bar : std::hash::Hash` is not satisfied
+//~^ error: `Bar: std::hash::Hash` is not satisfied
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-21659-show-relevant-trait-impls-1.rs b/src/test/compile-fail/issue-21659-show-relevant-trait-impls-1.rs
index 7bc4adfa85d..e880a8b212b 100644
--- a/src/test/compile-fail/issue-21659-show-relevant-trait-impls-1.rs
+++ b/src/test/compile-fail/issue-21659-show-relevant-trait-impls-1.rs
@@ -32,7 +32,7 @@ fn main() {
     let f1 = Bar;
 
     f1.foo(1usize);
-    //~^ error: the trait bound `Bar : Foo<usize>` is not satisfied
+    //~^ error: the trait bound `Bar: Foo<usize>` is not satisfied
     //~| help: the following implementations were found:
     //~| help:   <Bar as Foo<i32>>
     //~| help:   <Bar as Foo<u8>>
diff --git a/src/test/compile-fail/issue-21659-show-relevant-trait-impls-2.rs b/src/test/compile-fail/issue-21659-show-relevant-trait-impls-2.rs
index f4e53614472..2c5b18a8113 100644
--- a/src/test/compile-fail/issue-21659-show-relevant-trait-impls-2.rs
+++ b/src/test/compile-fail/issue-21659-show-relevant-trait-impls-2.rs
@@ -36,7 +36,7 @@ fn main() {
     let f1 = Bar;
 
     f1.foo(1usize);
-    //~^ error: the trait bound `Bar : Foo<usize>` is not satisfied
+    //~^ error: the trait bound `Bar: Foo<usize>` is not satisfied
     //~| help: the following implementations were found:
     //~| help:   <Bar as Foo<i8>>
     //~| help:   <Bar as Foo<i16>>
diff --git a/src/test/compile-fail/issue-21763.rs b/src/test/compile-fail/issue-21763.rs
index 2f0611a2086..cb0baee0a87 100644
--- a/src/test/compile-fail/issue-21763.rs
+++ b/src/test/compile-fail/issue-21763.rs
@@ -17,5 +17,5 @@ fn foo<T: Send>() {}
 
 fn main() {
     foo::<HashMap<Rc<()>, Rc<()>>>();
-    //~^ ERROR: `std::rc::Rc<()> : std::marker::Send` is not satisfied
+    //~^ ERROR: `std::rc::Rc<()>: std::marker::Send` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-22034.rs b/src/test/compile-fail/issue-22034.rs
index 29bef8c966a..3e0ab6d8921 100644
--- a/src/test/compile-fail/issue-22034.rs
+++ b/src/test/compile-fail/issue-22034.rs
@@ -14,7 +14,7 @@ fn main() {
     let ptr: *mut () = 0 as *mut _;
     let _: &mut Fn() = unsafe {
         &mut *(ptr as *mut Fn())
-        //~^ ERROR `() : std::ops::Fn<()>` is not satisfied
-        //~| ERROR `() : std::ops::FnOnce<()>` is not satisfied
+        //~^ ERROR `(): std::ops::Fn<()>` is not satisfied
+        //~| ERROR `(): std::ops::FnOnce<()>` is not satisfied
     };
 }
diff --git a/src/test/compile-fail/issue-25076.rs b/src/test/compile-fail/issue-25076.rs
index 9d0b559d13d..1c255b4e631 100644
--- a/src/test/compile-fail/issue-25076.rs
+++ b/src/test/compile-fail/issue-25076.rs
@@ -17,5 +17,5 @@ fn do_fold<B, F: InOut<B, Out=B>>(init: B, f: F) {}
 fn bot<T>() -> T { loop {} }
 
 fn main() {
-    do_fold(bot(), ()); //~ ERROR `() : InOut<_>` is not satisfied
+    do_fold(bot(), ()); //~ ERROR `(): InOut<_>` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-2611-4.rs b/src/test/compile-fail/issue-2611-4.rs
index 49f024399c7..16d7ea46846 100644
--- a/src/test/compile-fail/issue-2611-4.rs
+++ b/src/test/compile-fail/issue-2611-4.rs
@@ -21,7 +21,7 @@ struct E {
 
 impl A for E {
     fn b<F: Sync, G>(&self, _x: F) -> F { panic!() }
-    //~^ ERROR `F : std::marker::Sync` appears on the impl method
+    //~^ ERROR `F: std::marker::Sync` appears on the impl method
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-28098.rs b/src/test/compile-fail/issue-28098.rs
index aac282370c6..5dded2b1e16 100644
--- a/src/test/compile-fail/issue-28098.rs
+++ b/src/test/compile-fail/issue-28098.rs
@@ -10,13 +10,13 @@
 
 fn main() {
     let _ = Iterator::next(&mut ());
-    //~^ ERROR `() : std::iter::Iterator` is not satisfied
+    //~^ ERROR `(): std::iter::Iterator` is not satisfied
 
     for _ in false {}
-    //~^ ERROR `bool : std::iter::Iterator` is not satisfied
+    //~^ ERROR `bool: std::iter::Iterator` is not satisfied
 
     let _ = Iterator::next(&mut ());
-    //~^ ERROR `() : std::iter::Iterator` is not satisfied
+    //~^ ERROR `(): std::iter::Iterator` is not satisfied
 
     other()
 }
@@ -25,11 +25,11 @@ pub fn other() {
     // check errors are still reported globally
 
     let _ = Iterator::next(&mut ());
-    //~^ ERROR `() : std::iter::Iterator` is not satisfied
+    //~^ ERROR `(): std::iter::Iterator` is not satisfied
 
     let _ = Iterator::next(&mut ());
-    //~^ ERROR `() : std::iter::Iterator` is not satisfied
+    //~^ ERROR `(): std::iter::Iterator` is not satisfied
 
     for _ in false {}
-    //~^ ERROR `bool : std::iter::Iterator` is not satisfied
+    //~^ ERROR `bool: std::iter::Iterator` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-29147.rs b/src/test/compile-fail/issue-29147.rs
index 64bfa232f3f..0ecaa409412 100644
--- a/src/test/compile-fail/issue-29147.rs
+++ b/src/test/compile-fail/issue-29147.rs
@@ -28,5 +28,5 @@ impl Foo for S5<u32> { fn xxx(&self) {} }
 impl Foo for S5<u64> { fn xxx(&self) {} }
 
 fn main() {
-    let _ = <S5<_>>::xxx; //~ ERROR cannot resolve `S5<_> : Foo`
+    let _ = <S5<_>>::xxx; //~ ERROR cannot resolve `S5<_>: Foo`
 }
diff --git a/src/test/compile-fail/issue-5035-2.rs b/src/test/compile-fail/issue-5035-2.rs
index 118644ef2cb..83ff95cc2ea 100644
--- a/src/test/compile-fail/issue-5035-2.rs
+++ b/src/test/compile-fail/issue-5035-2.rs
@@ -11,6 +11,6 @@
 trait I {}
 type K = I+'static;
 
-fn foo(_x: K) {} //~ ERROR: `I + 'static : std::marker::Sized` is not satisfied
+fn foo(_x: K) {} //~ ERROR: `I + 'static: std::marker::Sized` is not satisfied
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-5883.rs b/src/test/compile-fail/issue-5883.rs
index 0058d5af62e..019a7bdc734 100644
--- a/src/test/compile-fail/issue-5883.rs
+++ b/src/test/compile-fail/issue-5883.rs
@@ -15,8 +15,8 @@ struct Struct {
 }
 
 fn new_struct(r: A+'static)
-    -> Struct { //~^  ERROR `A + 'static : std::marker::Sized` is not satisfied
-    //~^ ERROR `A + 'static : std::marker::Sized` is not satisfied
+    -> Struct { //~^  ERROR `A + 'static: std::marker::Sized` is not satisfied
+    //~^ ERROR `A + 'static: std::marker::Sized` is not satisfied
     Struct { r: r }
 }
 
diff --git a/src/test/compile-fail/issue-7013.rs b/src/test/compile-fail/issue-7013.rs
index c676c95ad25..95bbd4eccf4 100644
--- a/src/test/compile-fail/issue-7013.rs
+++ b/src/test/compile-fail/issue-7013.rs
@@ -34,5 +34,5 @@ struct A {
 
 fn main() {
     let a = A {v: box B{v: None} as Box<Foo+Send>};
-    //~^ ERROR `std::rc::Rc<std::cell::RefCell<A>> : std::marker::Send` is not satisfied
+    //~^ ERROR `std::rc::Rc<std::cell::RefCell<A>>: std::marker::Send` is not satisfied
 }
diff --git a/src/test/compile-fail/issue-7364.rs b/src/test/compile-fail/issue-7364.rs
index 8d4ebbe7207..16b407baad1 100644
--- a/src/test/compile-fail/issue-7364.rs
+++ b/src/test/compile-fail/issue-7364.rs
@@ -16,6 +16,6 @@ use std::cell::RefCell;
 // Regression test for issue 7364
 static boxed: Box<RefCell<isize>> = box RefCell::new(0);
 //~^ ERROR allocations are not allowed in statics
-//~| ERROR `std::cell::RefCell<isize> : std::marker::Sync` is not satisfied
+//~| ERROR `std::cell::RefCell<isize>: std::marker::Sync` is not satisfied
 
 fn main() { }
diff --git a/src/test/compile-fail/kindck-impl-type-params-2.rs b/src/test/compile-fail/kindck-impl-type-params-2.rs
index cf51e9bd608..1cf970e150d 100644
--- a/src/test/compile-fail/kindck-impl-type-params-2.rs
+++ b/src/test/compile-fail/kindck-impl-type-params-2.rs
@@ -21,5 +21,5 @@ fn take_param<T:Foo>(foo: &T) { }
 fn main() {
     let x: Box<_> = box 3;
     take_param(&x);
-    //~^ ERROR `Box<_> : std::marker::Copy` is not satisfied
+    //~^ ERROR `Box<_>: std::marker::Copy` is not satisfied
 }
diff --git a/src/test/compile-fail/kindck-send-unsafe.rs b/src/test/compile-fail/kindck-send-unsafe.rs
index c7eca74f780..ecee2e0a4c6 100644
--- a/src/test/compile-fail/kindck-send-unsafe.rs
+++ b/src/test/compile-fail/kindck-send-unsafe.rs
@@ -14,7 +14,7 @@ fn assert_send<T:Send>() { }
 
 fn test71<'a>() {
     assert_send::<*mut &'a isize>();
-    //~^ ERROR `*mut &'a isize : core::marker::Send` is not satisfied
+    //~^ ERROR `*mut &'a isize: core::marker::Send` is not satisfied
 }
 
 fn main() {
diff --git a/src/test/compile-fail/map-types.rs b/src/test/compile-fail/map-types.rs
index b2957a71a56..a419c6480e6 100644
--- a/src/test/compile-fail/map-types.rs
+++ b/src/test/compile-fail/map-types.rs
@@ -28,5 +28,5 @@ fn main() {
     let x: Box<Map<isize, isize>> = x;
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
     let y: Box<Map<usize, isize>> = Box::new(x);
-    //~^ ERROR `Box<Map<isize, isize>> : Map<usize, isize>` is not satisfied
+    //~^ ERROR `Box<Map<isize, isize>>: Map<usize, isize>` is not satisfied
 }
diff --git a/src/test/compile-fail/mutable-enum-indirect.rs b/src/test/compile-fail/mutable-enum-indirect.rs
index bb2fdbc555b..cafcabe6279 100644
--- a/src/test/compile-fail/mutable-enum-indirect.rs
+++ b/src/test/compile-fail/mutable-enum-indirect.rs
@@ -24,5 +24,5 @@ fn bar<T: Sync>(_: T) {}
 
 fn main() {
     let x = Foo::A(NoSync);
-    bar(&x); //~ ERROR `NoSync : std::marker::Sync` is not satisfied
+    bar(&x); //~ ERROR `NoSync: std::marker::Sync` is not satisfied
 }
diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs
index 81d174256ee..334952cefa6 100644
--- a/src/test/compile-fail/no-send-res-ports.rs
+++ b/src/test/compile-fail/no-send-res-ports.rs
@@ -33,7 +33,7 @@ fn main() {
     let x = foo(Port(Rc::new(())));
 
     thread::spawn(move|| {
-        //~^ ERROR `std::rc::Rc<()> : std::marker::Send` is not satisfied
+        //~^ ERROR `std::rc::Rc<()>: std::marker::Send` is not satisfied
         let y = x;
         println!("{:?}", y);
     });
diff --git a/src/test/compile-fail/no_send-enum.rs b/src/test/compile-fail/no_send-enum.rs
index 966d932f2a4..902710e96e2 100644
--- a/src/test/compile-fail/no_send-enum.rs
+++ b/src/test/compile-fail/no_send-enum.rs
@@ -24,5 +24,5 @@ fn bar<T: Send>(_: T) {}
 fn main() {
     let x = Foo::A(NoSend);
     bar(x);
-    //~^ ERROR `NoSend : std::marker::Send` is not satisfied
+    //~^ ERROR `NoSend: std::marker::Send` is not satisfied
 }
diff --git a/src/test/compile-fail/no_send-rc.rs b/src/test/compile-fail/no_send-rc.rs
index b6c7e1ad05a..69f6fcdc4af 100644
--- a/src/test/compile-fail/no_send-rc.rs
+++ b/src/test/compile-fail/no_send-rc.rs
@@ -15,5 +15,5 @@ fn bar<T: Send>(_: T) {}
 fn main() {
     let x = Rc::new(5);
     bar(x);
-    //~^ ERROR `std::rc::Rc<_> : std::marker::Send` is not satisfied
+    //~^ ERROR `std::rc::Rc<_>: std::marker::Send` is not satisfied
 }
diff --git a/src/test/compile-fail/no_send-struct.rs b/src/test/compile-fail/no_send-struct.rs
index 037753e6c5f..b2ca4f9f5db 100644
--- a/src/test/compile-fail/no_send-struct.rs
+++ b/src/test/compile-fail/no_send-struct.rs
@@ -23,5 +23,5 @@ fn bar<T: Send>(_: T) {}
 fn main() {
     let x = Foo { a: 5 };
     bar(x);
-    //~^ ERROR `Foo : std::marker::Send` is not satisfied
+    //~^ ERROR `Foo: std::marker::Send` is not satisfied
 }
diff --git a/src/test/compile-fail/no_share-enum.rs b/src/test/compile-fail/no_share-enum.rs
index be52dd41826..ae9a25a95b4 100644
--- a/src/test/compile-fail/no_share-enum.rs
+++ b/src/test/compile-fail/no_share-enum.rs
@@ -22,5 +22,5 @@ fn bar<T: Sync>(_: T) {}
 fn main() {
     let x = Foo::A(NoSync);
     bar(x);
-    //~^ ERROR `NoSync : std::marker::Sync` is not satisfied
+    //~^ ERROR `NoSync: std::marker::Sync` is not satisfied
 }
diff --git a/src/test/compile-fail/no_share-struct.rs b/src/test/compile-fail/no_share-struct.rs
index 944bcb48ab0..d64d37a2f6c 100644
--- a/src/test/compile-fail/no_share-struct.rs
+++ b/src/test/compile-fail/no_share-struct.rs
@@ -20,5 +20,5 @@ fn bar<T: Sync>(_: T) {}
 fn main() {
     let x = Foo { a: 5 };
     bar(x);
-    //~^ ERROR `Foo : std::marker::Sync` is not satisfied
+    //~^ ERROR `Foo: std::marker::Sync` is not satisfied
 }
diff --git a/src/test/compile-fail/not-sync.rs b/src/test/compile-fail/not-sync.rs
index 3955e3a040c..aa7a83a7baa 100644
--- a/src/test/compile-fail/not-sync.rs
+++ b/src/test/compile-fail/not-sync.rs
@@ -16,19 +16,19 @@ fn test<T: Sync>() {}
 
 fn main() {
     test::<Cell<i32>>();
-    //~^ ERROR `std::cell::Cell<i32> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::cell::Cell<i32>: std::marker::Sync` is not satisfied
     test::<RefCell<i32>>();
-    //~^ ERROR `std::cell::RefCell<i32> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::cell::RefCell<i32>: std::marker::Sync` is not satisfied
 
     test::<Rc<i32>>();
-    //~^ ERROR `std::rc::Rc<i32> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::rc::Rc<i32>: std::marker::Sync` is not satisfied
     test::<Weak<i32>>();
-    //~^ ERROR `std::rc::Weak<i32> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::rc::Weak<i32>: std::marker::Sync` is not satisfied
 
     test::<Receiver<i32>>();
-    //~^ ERROR `std::sync::mpsc::Receiver<i32> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::sync::mpsc::Receiver<i32>: std::marker::Sync` is not satisfied
     test::<Sender<i32>>();
-    //~^ ERROR `std::sync::mpsc::Sender<i32> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::sync::mpsc::Sender<i32>: std::marker::Sync` is not satisfied
     test::<SyncSender<i32>>();
-    //~^ ERROR `std::sync::mpsc::SyncSender<i32> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::sync::mpsc::SyncSender<i32>: std::marker::Sync` is not satisfied
 }
diff --git a/src/test/compile-fail/object-does-not-impl-trait.rs b/src/test/compile-fail/object-does-not-impl-trait.rs
index 6673a87e9e4..6fa261dea71 100644
--- a/src/test/compile-fail/object-does-not-impl-trait.rs
+++ b/src/test/compile-fail/object-does-not-impl-trait.rs
@@ -14,5 +14,5 @@
 trait Foo {}
 fn take_foo<F:Foo>(f: F) {}
 fn take_object(f: Box<Foo>) { take_foo(f); }
-//~^ ERROR `Box<Foo> : Foo` is not satisfied
+//~^ ERROR `Box<Foo>: Foo` is not satisfied
 fn main() {}
diff --git a/src/test/compile-fail/phantom-oibit.rs b/src/test/compile-fail/phantom-oibit.rs
index 0006b29979c..c84927ea266 100644
--- a/src/test/compile-fail/phantom-oibit.rs
+++ b/src/test/compile-fail/phantom-oibit.rs
@@ -31,11 +31,11 @@ struct Nested<T>(T);
 fn is_zen<T: Zen>(_: T) {}
 
 fn not_sync<T>(x: Guard<T>) {
-    is_zen(x)  //~ error: `T : std::marker::Sync` is not satisfied
+    is_zen(x)  //~ error: `T: std::marker::Sync` is not satisfied
 }
 
 fn nested_not_sync<T>(x: Nested<Guard<T>>) {
-    is_zen(x)  //~ error: `T : std::marker::Sync` is not satisfied
+    is_zen(x)  //~ error: `T: std::marker::Sync` is not satisfied
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/range-1.rs b/src/test/compile-fail/range-1.rs
index 25b7465a164..895d2450cfe 100644
--- a/src/test/compile-fail/range-1.rs
+++ b/src/test/compile-fail/range-1.rs
@@ -22,6 +22,6 @@ pub fn main() {
     // Unsized type.
     let arr: &[_] = &[1, 2, 3];
     let range = *arr..;
-    //~^ ERROR `[_] : std::marker::Sized` is not satisfied
-    //~| ERROR `[_] : std::marker::Sized` is not satisfied
+    //~^ ERROR `[_]: std::marker::Sized` is not satisfied
+    //~| ERROR `[_]: std::marker::Sized` is not satisfied
 }
diff --git a/src/test/compile-fail/reject-specialized-drops-8142.rs b/src/test/compile-fail/reject-specialized-drops-8142.rs
index b12e26fddf6..adc87022403 100644
--- a/src/test/compile-fail/reject-specialized-drops-8142.rs
+++ b/src/test/compile-fail/reject-specialized-drops-8142.rs
@@ -47,7 +47,7 @@ impl              Drop for P<i8>          { fn drop(&mut self) { } } // REJECT
 //~^ ERROR Implementations of Drop cannot be specialized
 
 impl<Adds_bnd:Bound> Drop for Q<Adds_bnd> { fn drop(&mut self) { } } // REJECT
-//~^ ERROR The requirement `Adds_bnd : Bound` is added only by the Drop impl.
+//~^ ERROR The requirement `Adds_bnd: Bound` is added only by the Drop impl.
 
 impl<'rbnd,Adds_rbnd:'rbnd> Drop for R<Adds_rbnd> { fn drop(&mut self) { } } // REJECT
 //~^ ERROR The requirement `Adds_rbnd : 'rbnd` is added only by the Drop impl.
diff --git a/src/test/compile-fail/repeat-to-run-dtor-twice.rs b/src/test/compile-fail/repeat-to-run-dtor-twice.rs
index 3553d0dab31..88441594a7e 100644
--- a/src/test/compile-fail/repeat-to-run-dtor-twice.rs
+++ b/src/test/compile-fail/repeat-to-run-dtor-twice.rs
@@ -25,5 +25,5 @@ impl Drop for Foo {
 fn main() {
     let a = Foo { x: 3 };
     let _ = [ a; 5 ];
-    //~^ ERROR `Foo : std::marker::Copy` is not satisfied
+    //~^ ERROR `Foo: std::marker::Copy` is not satisfied
 }
diff --git a/src/test/compile-fail/str-idx.rs b/src/test/compile-fail/str-idx.rs
index 61fa3cbfe69..b972a09b5c4 100644
--- a/src/test/compile-fail/str-idx.rs
+++ b/src/test/compile-fail/str-idx.rs
@@ -10,5 +10,5 @@
 
 pub fn main() {
     let s: &str = "hello";
-    let c: u8 = s[4]; //~ ERROR `str : std::ops::Index<_>` is not satisfied
+    let c: u8 = s[4]; //~ ERROR `str: std::ops::Index<_>` is not satisfied
 }
diff --git a/src/test/compile-fail/str-mut-idx.rs b/src/test/compile-fail/str-mut-idx.rs
index f372a17e045..8851e5e0797 100644
--- a/src/test/compile-fail/str-mut-idx.rs
+++ b/src/test/compile-fail/str-mut-idx.rs
@@ -12,11 +12,11 @@ fn bot<T>() -> T { loop {} }
 
 fn mutate(s: &mut str) {
     s[1..2] = bot();
-    //~^ ERROR `str : std::marker::Sized` is not satisfied
-    //~| ERROR `str : std::marker::Sized` is not satisfied
+    //~^ ERROR `str: std::marker::Sized` is not satisfied
+    //~| ERROR `str: std::marker::Sized` is not satisfied
     s[1usize] = bot();
-    //~^ ERROR `str : std::ops::Index<usize>` is not satisfied
-    //~| ERROR `str : std::ops::IndexMut<usize>` is not satisfied
+    //~^ ERROR `str: std::ops::Index<usize>` is not satisfied
+    //~| ERROR `str: std::ops::IndexMut<usize>` is not satisfied
 }
 
 pub fn main() {}
diff --git a/src/test/compile-fail/substs-verbose.rs b/src/test/compile-fail/substs-verbose.rs
new file mode 100644
index 00000000000..0ee7e67bebb
--- /dev/null
+++ b/src/test/compile-fail/substs-verbose.rs
@@ -0,0 +1,47 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+//
+// compile-flags: -Z verbose
+
+// TODO nikomatsakis: test with both verbose and without
+
+trait Foo<'b, 'c, S=u32> {
+    fn bar<'a, T>() where T: 'a {}
+    fn baz() {}
+}
+
+impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
+
+fn main() {}
+
+fn foo<'z>() where &'z (): Sized {
+    let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
+
+    let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `fn() {<i8 as Foo<ReStatic, ReStatic, u32>>::bar::<ReStatic, char>}`
+
+    let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
+
+    let x: () = foo::<'static>;
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `fn() {foo::<ReStatic>}`
+
+    <str as Foo<u8>>::bar;
+    //~^ ERROR `str: std::marker::Sized` is not satisfied
+}
diff --git a/src/test/compile-fail/trait-bounds-impl-comparison-1.rs b/src/test/compile-fail/trait-bounds-impl-comparison-1.rs
index fd0c2ddb502..3fffb2e19f2 100644
--- a/src/test/compile-fail/trait-bounds-impl-comparison-1.rs
+++ b/src/test/compile-fail/trait-bounds-impl-comparison-1.rs
@@ -34,15 +34,15 @@ trait Foo {
 impl Foo for isize {
     // invalid bound for T, was defined as Eq in trait
     fn test_error1_fn<T: Ord>(&self) {}
-    //~^ ERROR the requirement `T : std::cmp::Ord` appears on the impl
+    //~^ ERROR the requirement `T: std::cmp::Ord` appears on the impl
 
     // invalid bound for T, was defined as Eq + Ord in trait
     fn test_error2_fn<T: Eq + B>(&self) {}
-    //~^ ERROR the requirement `T : B` appears on the impl
+    //~^ ERROR the requirement `T: B` appears on the impl
 
     // invalid bound for T, was defined as Eq + Ord in trait
     fn test_error3_fn<T: B + Eq>(&self) {}
-    //~^ ERROR the requirement `T : B` appears on the impl
+    //~^ ERROR the requirement `T: B` appears on the impl
 
     // multiple bounds, same order as in trait
     fn test3_fn<T: Ord + Eq>(&self) {}
@@ -52,16 +52,16 @@ impl Foo for isize {
 
     // parameters in impls must be equal or more general than in the defining trait
     fn test_error5_fn<T: B>(&self) {}
-    //~^ ERROR the requirement `T : B` appears on the impl
+    //~^ ERROR the requirement `T: B` appears on the impl
 
     // bound `std::cmp::Eq` not enforced by this implementation, but this is OK
     fn test6_fn<T: A>(&self) {}
 
     fn test_error7_fn<T: A + Eq>(&self) {}
-    //~^ ERROR the requirement `T : std::cmp::Eq` appears on the impl
+    //~^ ERROR the requirement `T: std::cmp::Eq` appears on the impl
 
     fn test_error8_fn<T: C>(&self) {}
-    //~^ ERROR the requirement `T : C` appears on the impl
+    //~^ ERROR the requirement `T: C` appears on the impl
 }
 
 trait Getter<T> {
diff --git a/src/test/compile-fail/trait-bounds-impl-comparison-2.rs b/src/test/compile-fail/trait-bounds-impl-comparison-2.rs
index 01910939a80..8d587b29ba9 100644
--- a/src/test/compile-fail/trait-bounds-impl-comparison-2.rs
+++ b/src/test/compile-fail/trait-bounds-impl-comparison-2.rs
@@ -21,7 +21,7 @@ trait IteratorUtil<A>: Sized
 
 impl<A, T: Iterator<A>> IteratorUtil<A> for T {
     fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<T, U> {
-    //~^ ERROR the requirement `U : Iterator<B>` appears on the impl method
+    //~^ ERROR the requirement `U: Iterator<B>` appears on the impl method
         ZipIterator{a: self, b: other}
     }
 }
diff --git a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
index 0a771ecf63f..fd46d1a6296 100644
--- a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
+++ b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
@@ -15,7 +15,7 @@ trait Foo {
 // This should emit the less confusing error, not the more confusing one.
 
 fn foo(_x: Foo + Send) {
-    //~^ ERROR `Foo + Send + 'static : std::marker::Sized` is not satisfied
+    //~^ ERROR `Foo + Send + 'static: std::marker::Sized` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs
index 8dd38544d3c..24e2418e8d4 100644
--- a/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs
+++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs
@@ -21,7 +21,7 @@ enum Bar<T:Trait> {
 }
 
 impl<T> Foo<T> {
-//~^ ERROR `T : Trait` is not satisfied
+//~^ ERROR `T: Trait` is not satisfied
     fn uhoh() {}
 }
 
diff --git a/src/test/compile-fail/trait-coercion-generic-bad.rs b/src/test/compile-fail/trait-coercion-generic-bad.rs
index 85c26368f9f..dd64085f6f6 100644
--- a/src/test/compile-fail/trait-coercion-generic-bad.rs
+++ b/src/test/compile-fail/trait-coercion-generic-bad.rs
@@ -25,6 +25,6 @@ impl Trait<&'static str> for Struct {
 fn main() {
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
     let s: Box<Trait<isize>> = Box::new(Struct { person: "Fred" });
-    //~^ ERROR `Struct : Trait<isize>` is not satisfied
+    //~^ ERROR `Struct: Trait<isize>` is not satisfied
     s.f(1);
 }
diff --git a/src/test/compile-fail/trait-suggest-where-clause.rs b/src/test/compile-fail/trait-suggest-where-clause.rs
index 8827cccd0f3..6950bce7304 100644
--- a/src/test/compile-fail/trait-suggest-where-clause.rs
+++ b/src/test/compile-fail/trait-suggest-where-clause.rs
@@ -15,49 +15,49 @@ struct Misc<T:?Sized>(T);
 fn check<T: Iterator, U: ?Sized>() {
     // suggest a where-clause, if needed
     mem::size_of::<U>();
-    //~^ ERROR `U : std::marker::Sized` is not satisfied
+    //~^ ERROR `U: std::marker::Sized` is not satisfied
     //~| HELP E0277
-    //~| HELP consider adding a `where U : std::marker::Sized` bound
+    //~| HELP consider adding a `where U: std::marker::Sized` bound
     //~| NOTE required by `std::mem::size_of`
 
     mem::size_of::<Misc<U>>();
-    //~^ ERROR `U : std::marker::Sized` is not satisfied
+    //~^ ERROR `U: std::marker::Sized` is not satisfied
     //~| HELP E0277
-    //~| HELP consider adding a `where U : std::marker::Sized` bound
+    //~| HELP consider adding a `where U: std::marker::Sized` bound
     //~| NOTE required because it appears within the type `Misc<U>`
     //~| NOTE required by `std::mem::size_of`
 
     // ... even if T occurs as a type parameter
 
     <u64 as From<T>>::from;
-    //~^ ERROR `u64 : std::convert::From<T>` is not satisfied
+    //~^ ERROR `u64: std::convert::From<T>` is not satisfied
     //~| HELP E0277
-    //~| HELP consider adding a `where u64 : std::convert::From<T>` bound
+    //~| HELP consider adding a `where u64: std::convert::From<T>` bound
     //~| NOTE required by `std::convert::From::from`
 
     <u64 as From<<T as Iterator>::Item>>::from;
-    //~^ ERROR `u64 : std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
+    //~^ ERROR `u64: std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
     //~| HELP E0277
-    //~| HELP consider adding a `where u64 :
+    //~| HELP consider adding a `where u64:
     //~| NOTE required by `std::convert::From::from`
 
     // ... but not if there are inference variables
 
     <Misc<_> as From<T>>::from;
-    //~^ ERROR `Misc<_> : std::convert::From<T>` is not satisfied
+    //~^ ERROR `Misc<_>: std::convert::From<T>` is not satisfied
     //~| HELP E0277
     //~| NOTE required by `std::convert::From::from`
 
     // ... and also not if the error is not related to the type
 
     mem::size_of::<[T]>();
-    //~^ ERROR `[T] : std::marker::Sized` is not satisfied
+    //~^ ERROR `[T]: std::marker::Sized` is not satisfied
     //~| HELP E0277
     //~| NOTE `[T]` does not have a constant size
     //~| NOTE required by `std::mem::size_of`
 
     mem::size_of::<[&U]>();
-    //~^ ERROR `[&U] : std::marker::Sized` is not satisfied
+    //~^ ERROR `[&U]: std::marker::Sized` is not satisfied
     //~| HELP E0277
     //~| NOTE `[&U]` does not have a constant size
     //~| NOTE required by `std::mem::size_of`
diff --git a/src/test/compile-fail/traits-negative-impls.rs b/src/test/compile-fail/traits-negative-impls.rs
index 4a266dd07e6..8014f92e173 100644
--- a/src/test/compile-fail/traits-negative-impls.rs
+++ b/src/test/compile-fail/traits-negative-impls.rs
@@ -31,8 +31,8 @@ fn dummy() {
     impl !Send for TestType {}
 
     Outer(TestType);
-    //~^ ERROR `dummy::TestType : std::marker::Send` is not satisfied
-    //~| ERROR `dummy::TestType : std::marker::Send` is not satisfied
+    //~^ ERROR `dummy::TestType: std::marker::Send` is not satisfied
+    //~| ERROR `dummy::TestType: std::marker::Send` is not satisfied
 }
 
 fn dummy1b() {
@@ -40,7 +40,7 @@ fn dummy1b() {
     impl !Send for TestType {}
 
     is_send(TestType);
-    //~^ ERROR `dummy1b::TestType : std::marker::Send` is not satisfied
+    //~^ ERROR `dummy1b::TestType: std::marker::Send` is not satisfied
 }
 
 fn dummy1c() {
@@ -48,7 +48,7 @@ fn dummy1c() {
     impl !Send for TestType {}
 
     is_send((8, TestType));
-    //~^ ERROR `dummy1c::TestType : std::marker::Send` is not satisfied
+    //~^ ERROR `dummy1c::TestType: std::marker::Send` is not satisfied
 }
 
 fn dummy2() {
@@ -56,7 +56,7 @@ fn dummy2() {
     impl !Send for TestType {}
 
     is_send(Box::new(TestType));
-    //~^ ERROR `dummy2::TestType : std::marker::Send` is not satisfied
+    //~^ ERROR `dummy2::TestType: std::marker::Send` is not satisfied
 }
 
 fn dummy3() {
@@ -64,7 +64,7 @@ fn dummy3() {
     impl !Send for TestType {}
 
     is_send(Box::new(Outer2(TestType)));
-    //~^ ERROR `dummy3::TestType : std::marker::Send` is not satisfied
+    //~^ ERROR `dummy3::TestType: std::marker::Send` is not satisfied
 }
 
 fn main() {
@@ -74,5 +74,5 @@ fn main() {
     // This will complain about a missing Send impl because `Sync` is implement *just*
     // for T that are `Send`. Look at #20366 and #19950
     is_sync(Outer2(TestType));
-    //~^ ERROR `main::TestType : std::marker::Send` is not satisfied
+    //~^ ERROR `main::TestType: std::marker::Send` is not satisfied
 }
diff --git a/src/test/compile-fail/traits-repeated-supertrait-ambig.rs b/src/test/compile-fail/traits-repeated-supertrait-ambig.rs
index 244f75a3592..3fc0d638dd6 100644
--- a/src/test/compile-fail/traits-repeated-supertrait-ambig.rs
+++ b/src/test/compile-fail/traits-repeated-supertrait-ambig.rs
@@ -33,21 +33,21 @@ impl CompareTo<u64> for i64 {
 impl CompareToInts for i64 { }
 
 fn with_obj(c: &CompareToInts) -> bool {
-    c.same_as(22) //~ ERROR `CompareToInts : CompareTo<i32>` is not satisfied
+    c.same_as(22) //~ ERROR `CompareToInts: CompareTo<i32>` is not satisfied
 }
 
 fn with_trait<C:CompareToInts>(c: &C) -> bool {
-    c.same_as(22) //~ ERROR `C : CompareTo<i32>` is not satisfied
+    c.same_as(22) //~ ERROR `C: CompareTo<i32>` is not satisfied
 }
 
 fn with_ufcs1<C:CompareToInts>(c: &C) -> bool {
-    CompareToInts::same_as(c, 22) //~ ERROR `CompareToInts : CompareTo<i32>` is not satisfied
+    CompareToInts::same_as(c, 22) //~ ERROR `CompareToInts: CompareTo<i32>` is not satisfied
 }
 
 fn with_ufcs2<C:CompareToInts>(c: &C) -> bool {
-    CompareTo::same_as(c, 22) //~ ERROR `C : CompareTo<i32>` is not satisfied
+    CompareTo::same_as(c, 22) //~ ERROR `C: CompareTo<i32>` is not satisfied
 }
 
 fn main() {
-    assert_eq!(22_i64.same_as(22), true); //~ ERROR `i64 : CompareTo<i32>` is not satisfied
+    assert_eq!(22_i64.same_as(22), true); //~ ERROR `i64: CompareTo<i32>` is not satisfied
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-constituent-types-2.rs b/src/test/compile-fail/typeck-default-trait-impl-constituent-types-2.rs
index 93800d3907a..8a46d6c76c3 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-constituent-types-2.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-constituent-types-2.rs
@@ -26,5 +26,5 @@ fn main() {
     is_mytrait::<MyS>();
 
     is_mytrait::<(MyS2, MyS)>();
-    //~^ ERROR `MyS2 : MyTrait` is not satisfied
+    //~^ ERROR `MyS2: MyTrait` is not satisfied
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-constituent-types.rs b/src/test/compile-fail/typeck-default-trait-impl-constituent-types.rs
index a49047524e6..3d7746b369c 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-constituent-types.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-constituent-types.rs
@@ -29,5 +29,5 @@ fn main() {
     is_mytrait::<MyS>();
 
     is_mytrait::<MyS2>();
-    //~^ ERROR `MyS2 : MyTrait` is not satisfied
+    //~^ ERROR `MyS2: MyTrait` is not satisfied
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-negation-send.rs b/src/test/compile-fail/typeck-default-trait-impl-negation-send.rs
index 0158cbcfcda..853718f1e77 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-negation-send.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-negation-send.rs
@@ -27,5 +27,5 @@ fn is_send<T: Send>() {}
 fn main() {
     is_send::<MySendable>();
     is_send::<MyNotSendable>();
-    //~^ ERROR `MyNotSendable : std::marker::Send` is not satisfied
+    //~^ ERROR `MyNotSendable: std::marker::Send` is not satisfied
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs b/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs
index 6cfc9bc5f5e..cdf787a60ad 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs
@@ -43,11 +43,11 @@ fn is_sync<T: Sync>() {}
 fn main() {
     is_sync::<MySync>();
     is_sync::<MyNotSync>();
-    //~^ ERROR `MyNotSync : std::marker::Sync` is not satisfied
+    //~^ ERROR `MyNotSync: std::marker::Sync` is not satisfied
 
     is_sync::<MyTypeWUnsafe>();
-    //~^ ERROR `std::cell::UnsafeCell<u8> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::cell::UnsafeCell<u8>: std::marker::Sync` is not satisfied
 
     is_sync::<MyTypeManaged>();
-    //~^ ERROR `Managed : std::marker::Sync` is not satisfied
+    //~^ ERROR `Managed: std::marker::Sync` is not satisfied
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-negation.rs b/src/test/compile-fail/typeck-default-trait-impl-negation.rs
index 98e617ee665..8c2658b89a5 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-negation.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-negation.rs
@@ -33,10 +33,10 @@ fn is_my_unsafe_trait<T: MyUnsafeTrait>() {}
 fn main() {
     is_my_trait::<ThisImplsTrait>();
     is_my_trait::<ThisImplsUnsafeTrait>();
-    //~^ ERROR `ThisImplsUnsafeTrait : MyTrait` is not satisfied
+    //~^ ERROR `ThisImplsUnsafeTrait: MyTrait` is not satisfied
 
     is_my_unsafe_trait::<ThisImplsTrait>();
-    //~^ ERROR `ThisImplsTrait : MyUnsafeTrait` is not satisfied
+    //~^ ERROR `ThisImplsTrait: MyUnsafeTrait` is not satisfied
 
     is_my_unsafe_trait::<ThisImplsUnsafeTrait>();
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-precedence.rs b/src/test/compile-fail/typeck-default-trait-impl-precedence.rs
index 109b2ed24ea..66c7a1c75ff 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-precedence.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-precedence.rs
@@ -27,5 +27,5 @@ impl Signed for i32 { }
 fn main() {
     is_defaulted::<&'static i32>();
     is_defaulted::<&'static u32>();
-    //~^ ERROR `u32 : Signed` is not satisfied
+    //~^ ERROR `u32: Signed` is not satisfied
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-supertrait.rs b/src/test/compile-fail/typeck-default-trait-impl-supertrait.rs
index 81c4a3c5a51..0b071a9acd0 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-supertrait.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-supertrait.rs
@@ -24,6 +24,6 @@ fn foo<T:MyTrait>() { bar::<T>() }
 fn bar<T:NotImplemented>() { }
 
 fn main() {
-    foo::<i32>(); //~ ERROR `i32 : NotImplemented` is not satisfied
-    bar::<i64>(); //~ ERROR `i64 : NotImplemented` is not satisfied
+    foo::<i32>(); //~ ERROR `i32: NotImplemented` is not satisfied
+    bar::<i64>(); //~ ERROR `i64: NotImplemented` is not satisfied
 }
diff --git a/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause-2.rs b/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause-2.rs
index 29379d54961..3085f45a83d 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause-2.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause-2.rs
@@ -29,7 +29,7 @@ fn bar<T:NotImplemented>() { }
 
 fn test() {
     bar::<Option<i32>>();
-    //~^ ERROR `std::option::Option<i32> : NotImplemented` is not satisfied
+    //~^ ERROR `std::option::Option<i32>: NotImplemented` is not satisfied
 }
 
 fn main() {
diff --git a/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs b/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs
index a3a80e17e40..47e87c09d12 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs
@@ -26,7 +26,7 @@ impl NotImplemented for i32 {}
 impl MyTrait for .. {}
 
 fn foo<T:MyTrait>() {
-    //~^ ERROR `std::option::Option<T> : NotImplemented` is not satisfied
+    //~^ ERROR `std::option::Option<T>: NotImplemented` is not satisfied
     // This should probably typecheck. This is #20671.
 }
 
diff --git a/src/test/compile-fail/typeck-unsafe-always-share.rs b/src/test/compile-fail/typeck-unsafe-always-share.rs
index f34bae3be3c..6047f6770a7 100644
--- a/src/test/compile-fail/typeck-unsafe-always-share.rs
+++ b/src/test/compile-fail/typeck-unsafe-always-share.rs
@@ -27,16 +27,16 @@ fn test<T: Sync>(s: T) {}
 fn main() {
     let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0)});
     test(us);
-    //~^ ERROR `std::cell::UnsafeCell<MySync<_>> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::cell::UnsafeCell<MySync<_>>: std::marker::Sync` is not satisfied
 
     let uns = UnsafeCell::new(NoSync);
     test(uns);
-    //~^ ERROR `std::cell::UnsafeCell<NoSync> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::cell::UnsafeCell<NoSync>: std::marker::Sync` is not satisfied
 
     let ms = MySync{u: uns};
     test(ms);
-    //~^ ERROR `std::cell::UnsafeCell<NoSync> : std::marker::Sync` is not satisfied
+    //~^ ERROR `std::cell::UnsafeCell<NoSync>: std::marker::Sync` is not satisfied
 
     test(NoSync);
-    //~^ ERROR `NoSync : std::marker::Sync` is not satisfied
+    //~^ ERROR `NoSync: std::marker::Sync` is not satisfied
 }
diff --git a/src/test/compile-fail/ufcs-qpath-self-mismatch.rs b/src/test/compile-fail/ufcs-qpath-self-mismatch.rs
index 792c4a8ca3c..94a98b1582a 100644
--- a/src/test/compile-fail/ufcs-qpath-self-mismatch.rs
+++ b/src/test/compile-fail/ufcs-qpath-self-mismatch.rs
@@ -12,7 +12,7 @@ use std::ops::Add;
 
 fn main() {
     <i32 as Add<u32>>::add(1, 2);
-    //~^ ERROR `i32 : std::ops::Add<u32>` is not satisfied
+    //~^ ERROR `i32: std::ops::Add<u32>` is not satisfied
     <i32 as Add<i32>>::add(1u32, 2);
     //~^ ERROR mismatched types
     <i32 as Add<i32>>::add(1, 2u32);
diff --git a/src/test/compile-fail/unsized-bare-typaram.rs b/src/test/compile-fail/unsized-bare-typaram.rs
index 49642ac1490..3dcc7d248d7 100644
--- a/src/test/compile-fail/unsized-bare-typaram.rs
+++ b/src/test/compile-fail/unsized-bare-typaram.rs
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn bar<T: Sized>() { }
-fn foo<T: ?Sized>() { bar::<T>() } //~ ERROR `T : std::marker::Sized` is not satisfied
+fn foo<T: ?Sized>() { bar::<T>() } //~ ERROR `T: std::marker::Sized` is not satisfied
 fn main() { }
diff --git a/src/test/compile-fail/unsized-enum.rs b/src/test/compile-fail/unsized-enum.rs
index bd5b705511d..61b2b01b355 100644
--- a/src/test/compile-fail/unsized-enum.rs
+++ b/src/test/compile-fail/unsized-enum.rs
@@ -15,14 +15,14 @@ fn not_sized<T: ?Sized>() { }
 enum Foo<U> { FooSome(U), FooNone }
 fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory.
 fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
-//~^ ERROR `T : std::marker::Sized` is not satisfied
+//~^ ERROR `T: std::marker::Sized` is not satisfied
 //
 // Not OK: `T` is not sized.
 
 enum Bar<U: ?Sized> { BarSome(U), BarNone }
 fn bar1<T: ?Sized>() { not_sized::<Bar<T>>() }
 fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() }
-//~^ ERROR `T : std::marker::Sized` is not satisfied
+//~^ ERROR `T: std::marker::Sized` is not satisfied
 //
 // Not OK: `Bar<T>` is not sized, but it should be.
 
diff --git a/src/test/compile-fail/unsized-struct.rs b/src/test/compile-fail/unsized-struct.rs
index 94f15033cb7..bbefb2fcecd 100644
--- a/src/test/compile-fail/unsized-struct.rs
+++ b/src/test/compile-fail/unsized-struct.rs
@@ -15,14 +15,14 @@ fn not_sized<T: ?Sized>() { }
 struct Foo<T> { data: T }
 fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory.
 fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
-//~^ ERROR `T : std::marker::Sized` is not satisfied
+//~^ ERROR `T: std::marker::Sized` is not satisfied
 //
 // Not OK: `T` is not sized.
 
 struct Bar<T: ?Sized> { data: T }
 fn bar1<T: ?Sized>() { not_sized::<Bar<T>>() }
 fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() }
-//~^ ERROR `T : std::marker::Sized` is not satisfied
+//~^ ERROR `T: std::marker::Sized` is not satisfied
 //
 // Not OK: `Bar<T>` is not sized, but it should be.
 
diff --git a/src/test/compile-fail/unsized-trait-impl-trait-arg.rs b/src/test/compile-fail/unsized-trait-impl-trait-arg.rs
index bd420d940d5..ad5e4c2daef 100644
--- a/src/test/compile-fail/unsized-trait-impl-trait-arg.rs
+++ b/src/test/compile-fail/unsized-trait-impl-trait-arg.rs
@@ -16,7 +16,7 @@ trait T2<Z> {
 }
 struct S4<Y: ?Sized>(Box<Y>);
 impl<X: ?Sized> T2<X> for S4<X> {
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/unsized3.rs b/src/test/compile-fail/unsized3.rs
index 061f0695df7..f88165c02e9 100644
--- a/src/test/compile-fail/unsized3.rs
+++ b/src/test/compile-fail/unsized3.rs
@@ -15,7 +15,7 @@ use std::marker;
 // Unbounded.
 fn f1<X: ?Sized>(x: &X) {
     f2::<X>(x);
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
 }
 fn f2<X>(x: &X) {
 }
@@ -26,7 +26,7 @@ trait T {
 }
 fn f3<X: ?Sized + T>(x: &X) {
     f4::<X>(x);
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
 }
 fn f4<X: T>(x: &X) {
 }
@@ -40,7 +40,7 @@ fn f5<Y>(x: &Y) {}
 fn f6<X: ?Sized>(x: &X) {}
 fn f7<X: ?Sized>(x1: &E<X>, x2: &E<X>) {
     f5(x1);
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
     f6(x2); // ok
 }
 
@@ -52,19 +52,19 @@ struct S<X: ?Sized> {
 
 fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
     f5(x1);
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
     f6(x2); // ok
 }
 
 // Test some tuples.
 fn f9<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
     f5(&(*x1, 34));
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
 }
 
 fn f10<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
     f5(&(32, *x2));
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
 }
 
 pub fn main() {
diff --git a/src/test/compile-fail/unsized5.rs b/src/test/compile-fail/unsized5.rs
index 1abc45d5df8..3e6c9cc4061 100644
--- a/src/test/compile-fail/unsized5.rs
+++ b/src/test/compile-fail/unsized5.rs
@@ -11,27 +11,27 @@
 // Test `?Sized` types not allowed in fields (except the last one).
 
 struct S1<X: ?Sized> {
-    f1: X, //~ ERROR `X : std::marker::Sized` is not satisfied
+    f1: X, //~ ERROR `X: std::marker::Sized` is not satisfied
     f2: isize,
 }
 struct S2<X: ?Sized> {
     f: isize,
-    g: X, //~ ERROR `X : std::marker::Sized` is not satisfied
+    g: X, //~ ERROR `X: std::marker::Sized` is not satisfied
     h: isize,
 }
 struct S3 {
-    f: str, //~ ERROR `str : std::marker::Sized` is not satisfied
+    f: str, //~ ERROR `str: std::marker::Sized` is not satisfied
     g: [usize]
 }
 struct S4 {
-    f: [u8], //~ ERROR `[u8] : std::marker::Sized` is not satisfied
+    f: [u8], //~ ERROR `[u8]: std::marker::Sized` is not satisfied
     g: usize
 }
 enum E<X: ?Sized> {
-    V1(X, isize), //~ERROR `X : std::marker::Sized` is not satisfied
+    V1(X, isize), //~ERROR `X: std::marker::Sized` is not satisfied
 }
 enum F<X: ?Sized> {
-    V2{f1: X, f: isize}, //~ERROR `X : std::marker::Sized` is not satisfied
+    V2{f1: X, f: isize}, //~ERROR `X: std::marker::Sized` is not satisfied
 }
 
 pub fn main() {
diff --git a/src/test/compile-fail/unsized6.rs b/src/test/compile-fail/unsized6.rs
index 7545794bd23..663cb0a1716 100644
--- a/src/test/compile-fail/unsized6.rs
+++ b/src/test/compile-fail/unsized6.rs
@@ -15,27 +15,27 @@ trait T {}
 fn f1<X: ?Sized>(x: &X) {
     let _: X; // <-- this is OK, no bindings created, no initializer.
     let _: (isize, (X, isize)); // same
-    let y: X; //~ERROR `X : std::marker::Sized` is not satisfied
-    let y: (isize, (X, isize)); //~ERROR `X : std::marker::Sized` is not satisfied
+    let y: X; //~ERROR `X: std::marker::Sized` is not satisfied
+    let y: (isize, (X, isize)); //~ERROR `X: std::marker::Sized` is not satisfied
 }
 fn f2<X: ?Sized + T>(x: &X) {
-    let y: X; //~ERROR `X : std::marker::Sized` is not satisfied
-    let y: (isize, (X, isize)); //~ERROR `X : std::marker::Sized` is not satisfied
+    let y: X; //~ERROR `X: std::marker::Sized` is not satisfied
+    let y: (isize, (X, isize)); //~ERROR `X: std::marker::Sized` is not satisfied
 }
 
 fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-    let y: X = *x1; //~ERROR `X : std::marker::Sized` is not satisfied
-    let y = *x2; //~ERROR `X : std::marker::Sized` is not satisfied
-    let (y, z) = (*x3, 4); //~ERROR `X : std::marker::Sized` is not satisfied
+    let y: X = *x1; //~ERROR `X: std::marker::Sized` is not satisfied
+    let y = *x2; //~ERROR `X: std::marker::Sized` is not satisfied
+    let (y, z) = (*x3, 4); //~ERROR `X: std::marker::Sized` is not satisfied
 }
 fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-    let y: X = *x1;         //~ERROR `X : std::marker::Sized` is not satisfied
-    let y = *x2;            //~ERROR `X : std::marker::Sized` is not satisfied
-    let (y, z) = (*x3, 4); //~ERROR `X : std::marker::Sized` is not satisfied
+    let y: X = *x1;         //~ERROR `X: std::marker::Sized` is not satisfied
+    let y = *x2;            //~ERROR `X: std::marker::Sized` is not satisfied
+    let (y, z) = (*x3, 4); //~ERROR `X: std::marker::Sized` is not satisfied
 }
 
-fn g1<X: ?Sized>(x: X) {} //~ERROR `X : std::marker::Sized` is not satisfied
-fn g2<X: ?Sized + T>(x: X) {} //~ERROR `X : std::marker::Sized` is not satisfied
+fn g1<X: ?Sized>(x: X) {} //~ERROR `X: std::marker::Sized` is not satisfied
+fn g2<X: ?Sized + T>(x: X) {} //~ERROR `X: std::marker::Sized` is not satisfied
 
 pub fn main() {
 }
diff --git a/src/test/compile-fail/unsized7.rs b/src/test/compile-fail/unsized7.rs
index 5aa1f133679..25868c594fe 100644
--- a/src/test/compile-fail/unsized7.rs
+++ b/src/test/compile-fail/unsized7.rs
@@ -20,7 +20,7 @@ trait T1<Z: T> {
 
 struct S3<Y: ?Sized>(Box<Y>);
 impl<X: ?Sized + T> T1<X> for S3<X> {
-    //~^ ERROR `X : std::marker::Sized` is not satisfied
+    //~^ ERROR `X: std::marker::Sized` is not satisfied
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/vtable-res-trait-param.rs b/src/test/compile-fail/vtable-res-trait-param.rs
index e32cb32a74d..eb0baff0005 100644
--- a/src/test/compile-fail/vtable-res-trait-param.rs
+++ b/src/test/compile-fail/vtable-res-trait-param.rs
@@ -24,7 +24,7 @@ impl TraitB for isize {
 
 fn call_it<B:TraitB>(b: B)  -> isize {
     let y = 4;
-    b.gimme_an_a(y) //~ ERROR `_ : TraitA` is not satisfied
+    b.gimme_an_a(y) //~ ERROR `_: TraitA` is not satisfied
 }
 
 fn main() {
diff --git a/src/test/compile-fail/wf-impl-associated-type-trait.rs b/src/test/compile-fail/wf-impl-associated-type-trait.rs
index 2fee2604a8a..1e82f609d2a 100644
--- a/src/test/compile-fail/wf-impl-associated-type-trait.rs
+++ b/src/test/compile-fail/wf-impl-associated-type-trait.rs
@@ -25,7 +25,7 @@ pub trait Foo {
 
 impl<T> Foo for T {
     type Bar = MySet<T>;
-    //~^ ERROR the trait bound `T : MyHash` is not satisfied
+    //~^ ERROR the trait bound `T: MyHash` is not satisfied
 }
 
 #[rustc_error]
diff --git a/src/test/compile-fail/where-clause-constraints-are-local-for-inherent-impl.rs b/src/test/compile-fail/where-clause-constraints-are-local-for-inherent-impl.rs
index 4b85f2275a7..458ee669424 100644
--- a/src/test/compile-fail/where-clause-constraints-are-local-for-inherent-impl.rs
+++ b/src/test/compile-fail/where-clause-constraints-are-local-for-inherent-impl.rs
@@ -21,7 +21,7 @@ impl<T> Foo<T> {
 
     fn fails_copy(self) {
         require_copy(self.x);
-        //~^ ERROR the trait bound `T : std::marker::Copy` is not satisfied
+        //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied
     }
 }
 
diff --git a/src/test/compile-fail/where-clause-constraints-are-local-for-trait-impl.rs b/src/test/compile-fail/where-clause-constraints-are-local-for-trait-impl.rs
index f55586982be..b3f99f2ae25 100644
--- a/src/test/compile-fail/where-clause-constraints-are-local-for-trait-impl.rs
+++ b/src/test/compile-fail/where-clause-constraints-are-local-for-trait-impl.rs
@@ -26,7 +26,7 @@ impl<T> Foo<T> for Bar<T> {
 
     fn fails_copy(self) {
         require_copy(self.x);
-        //~^ ERROR the trait bound `T : std::marker::Copy` is not satisfied
+        //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied
     }
 }
 
diff --git a/src/test/compile-fail/where-clause-method-substituion.rs b/src/test/compile-fail/where-clause-method-substituion.rs
index 9f217f29bd1..05a58daf906 100644
--- a/src/test/compile-fail/where-clause-method-substituion.rs
+++ b/src/test/compile-fail/where-clause-method-substituion.rs
@@ -28,5 +28,5 @@ impl Bar<X> for isize {
 
 fn main() {
     1.method::<X>();
-    //~^ ERROR the trait bound `X : Foo<X>` is not satisfied
+    //~^ ERROR the trait bound `X: Foo<X>` is not satisfied
 }
diff --git a/src/test/compile-fail/where-clauses-method-unsatisfied.rs b/src/test/compile-fail/where-clauses-method-unsatisfied.rs
index 34ff872ac15..1ac03330afd 100644
--- a/src/test/compile-fail/where-clauses-method-unsatisfied.rs
+++ b/src/test/compile-fail/where-clauses-method-unsatisfied.rs
@@ -26,5 +26,5 @@ impl<T> Foo<T> {
 fn main() {
     let x = Foo { value: Bar };
     x.equals(&x);
-    //~^ ERROR `Bar : std::cmp::Eq` is not satisfied
+    //~^ ERROR `Bar: std::cmp::Eq` is not satisfied
 }
diff --git a/src/test/compile-fail/where-clauses-unsatisfied.rs b/src/test/compile-fail/where-clauses-unsatisfied.rs
index 38470bc3de6..278a8db4e1a 100644
--- a/src/test/compile-fail/where-clauses-unsatisfied.rs
+++ b/src/test/compile-fail/where-clauses-unsatisfied.rs
@@ -15,5 +15,5 @@ struct Struct;
 
 fn main() {
     drop(equal(&Struct, &Struct))
-    //~^ ERROR the trait bound `Struct : std::cmp::Eq` is not satisfied
+    //~^ ERROR the trait bound `Struct: std::cmp::Eq` is not satisfied
 }
diff --git a/src/test/compile-fail/where-for-self-2.rs b/src/test/compile-fail/where-for-self-2.rs
index 1baaed3dd37..bf8fc292173 100644
--- a/src/test/compile-fail/where-for-self-2.rs
+++ b/src/test/compile-fail/where-for-self-2.rs
@@ -29,5 +29,5 @@ fn foo<T>(x: &T)
 
 fn main() {
     foo(&X);
-    //~^ error: `for<'a> &'a _ : Bar` is not satisfied
+    //~^ error: `for<'a> &'a _: Bar` is not satisfied
 }