]> git.lizzy.rs Git - rust.git/commitdiff
improve the printing of substs and trait-refs
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Tue, 5 Apr 2016 19:56:23 +0000 (22:56 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Tue, 5 Apr 2016 19:56:23 +0000 (22:56 +0300)
118 files changed:
src/librustc/util/ppaux.rs
src/test/compile-fail/associated-types-for-unimpl-trait.rs
src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs
src/test/compile-fail/associated-types-no-suitable-bound.rs
src/test/compile-fail/associated-types-no-suitable-supertrait-2.rs
src/test/compile-fail/associated-types-no-suitable-supertrait.rs
src/test/compile-fail/associated-types-path-2.rs
src/test/compile-fail/associated-types-unsized.rs
src/test/compile-fail/bad-method-typaram-kind.rs
src/test/compile-fail/bad-sized.rs
src/test/compile-fail/builtin-superkinds-double-superkind.rs
src/test/compile-fail/builtin-superkinds-in-metadata.rs
src/test/compile-fail/builtin-superkinds-simple.rs
src/test/compile-fail/builtin-superkinds-typaram-not-send.rs
src/test/compile-fail/cast-rfc0401.rs
src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs
src/test/compile-fail/closure-bounds-subtype.rs
src/test/compile-fail/cross-fn-cache-hole.rs
src/test/compile-fail/deriving-no-inner-impl-error-message.rs
src/test/compile-fail/deriving-span-Default-struct.rs
src/test/compile-fail/destructure-trait-ref.rs
src/test/compile-fail/dst-bad-assign-2.rs
src/test/compile-fail/dst-bad-assign.rs
src/test/compile-fail/dst-bad-coerce1.rs
src/test/compile-fail/dst-bad-deep.rs
src/test/compile-fail/dst-object-from-unsized-type.rs
src/test/compile-fail/dst-sized-trait-param.rs
src/test/compile-fail/extern-wrong-value-type.rs
src/test/compile-fail/for-loop-bogosity.rs
src/test/compile-fail/hrtb-just-for-static.rs
src/test/compile-fail/hrtb-perfect-forwarding.rs
src/test/compile-fail/ifmt-unimpl.rs
src/test/compile-fail/impl-bounds-checking.rs
src/test/compile-fail/indexing-requires-a-uint.rs
src/test/compile-fail/issue-14084.rs
src/test/compile-fail/issue-14366.rs
src/test/compile-fail/issue-14853.rs
src/test/compile-fail/issue-15756.rs
src/test/compile-fail/issue-16538.rs
src/test/compile-fail/issue-17651.rs
src/test/compile-fail/issue-17718-static-sync.rs
src/test/compile-fail/issue-17959.rs
src/test/compile-fail/issue-18107.rs
src/test/compile-fail/issue-18611.rs
src/test/compile-fail/issue-18919.rs
src/test/compile-fail/issue-1920-1.rs
src/test/compile-fail/issue-1920-2.rs
src/test/compile-fail/issue-1920-3.rs
src/test/compile-fail/issue-20005.rs
src/test/compile-fail/issue-20162.rs
src/test/compile-fail/issue-20605.rs
src/test/compile-fail/issue-21160.rs
src/test/compile-fail/issue-21659-show-relevant-trait-impls-1.rs
src/test/compile-fail/issue-21659-show-relevant-trait-impls-2.rs
src/test/compile-fail/issue-21763.rs
src/test/compile-fail/issue-22034.rs
src/test/compile-fail/issue-25076.rs
src/test/compile-fail/issue-2611-4.rs
src/test/compile-fail/issue-28098.rs
src/test/compile-fail/issue-29147.rs
src/test/compile-fail/issue-5035-2.rs
src/test/compile-fail/issue-5883.rs
src/test/compile-fail/issue-7013.rs
src/test/compile-fail/issue-7364.rs
src/test/compile-fail/kindck-impl-type-params-2.rs
src/test/compile-fail/kindck-send-unsafe.rs
src/test/compile-fail/map-types.rs
src/test/compile-fail/mutable-enum-indirect.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/no_send-enum.rs
src/test/compile-fail/no_send-rc.rs
src/test/compile-fail/no_send-struct.rs
src/test/compile-fail/no_share-enum.rs
src/test/compile-fail/no_share-struct.rs
src/test/compile-fail/not-sync.rs
src/test/compile-fail/object-does-not-impl-trait.rs
src/test/compile-fail/phantom-oibit.rs
src/test/compile-fail/range-1.rs
src/test/compile-fail/reject-specialized-drops-8142.rs
src/test/compile-fail/repeat-to-run-dtor-twice.rs
src/test/compile-fail/str-idx.rs
src/test/compile-fail/str-mut-idx.rs
src/test/compile-fail/substs-verbose.rs [new file with mode: 0644]
src/test/compile-fail/trait-bounds-impl-comparison-1.rs
src/test/compile-fail/trait-bounds-impl-comparison-2.rs
src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
src/test/compile-fail/trait-bounds-on-structs-and-enums.rs
src/test/compile-fail/trait-coercion-generic-bad.rs
src/test/compile-fail/trait-suggest-where-clause.rs
src/test/compile-fail/traits-negative-impls.rs
src/test/compile-fail/traits-repeated-supertrait-ambig.rs
src/test/compile-fail/typeck-default-trait-impl-constituent-types-2.rs
src/test/compile-fail/typeck-default-trait-impl-constituent-types.rs
src/test/compile-fail/typeck-default-trait-impl-negation-send.rs
src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs
src/test/compile-fail/typeck-default-trait-impl-negation.rs
src/test/compile-fail/typeck-default-trait-impl-precedence.rs
src/test/compile-fail/typeck-default-trait-impl-supertrait.rs
src/test/compile-fail/typeck-default-trait-impl-trait-where-clause-2.rs
src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs
src/test/compile-fail/typeck-unsafe-always-share.rs
src/test/compile-fail/ufcs-qpath-self-mismatch.rs
src/test/compile-fail/unsized-bare-typaram.rs
src/test/compile-fail/unsized-enum.rs
src/test/compile-fail/unsized-struct.rs
src/test/compile-fail/unsized-trait-impl-trait-arg.rs
src/test/compile-fail/unsized3.rs
src/test/compile-fail/unsized5.rs
src/test/compile-fail/unsized6.rs
src/test/compile-fail/unsized7.rs
src/test/compile-fail/vtable-res-trait-param.rs
src/test/compile-fail/wf-impl-associated-type-trait.rs
src/test/compile-fail/where-clause-constraints-are-local-for-inherent-impl.rs
src/test/compile-fail/where-clause-constraints-are-local-for-trait-impl.rs
src/test/compile-fail/where-clause-method-substituion.rs
src/test/compile-fail/where-clauses-method-unsatisfied.rs
src/test/compile-fail/where-clauses-unsatisfied.rs
src/test/compile-fail/where-for-self-2.rs

index 20f16a1d255c7738f9c2377b21f6fffac9f8b016..b75f7965d1a09c2f5caf27afa2f9bd55331f4dba 100644 (file)
@@ -19,6 +19,7 @@
 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 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 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)
     }
 }
 
index 9fa24850e037f49895d883086d4408d4f34bdbbd..a6fcb9cff13ea58ed40f8ed2b575d952cd3d7730 100644 (file)
@@ -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() {
index 18d9ea52ff25efe2bfd7f22dcc281bbe15d1e329..83726a1676d261911166fe0b541e9a515cdf4e54 100644 (file)
@@ -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() { }
index 0aafd193c90d3e9fc2278f1ac08cedc0bba14767..baf56ffec86921cb7a78fb6f7407cae57b3c5bdc 100644 (file)
@@ -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() {
index 225ee0857013bbe2616f0a390faea9f45be1558d..e0f0f3c47ae5ec312ecb2799e65716ca88623b9a 100644 (file)
@@ -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() { }
index fe519beef672624d5c1705896a725b6697b2ad95..ec38595e8fe06fa6e15fe6229270e8bc45b204a5 100644 (file)
@@ -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() { }
index ee228899bb378da311c238569294386db075c144..0c077e37e43bebe23675326ecb13a34160579db6 100644 (file)
@@ -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() {
index 468b40e697185d07cf0fb608464982cb30f340c5..f1827022964169293e55e73260846c06158fca5e 100644 (file)
@@ -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() {
index 4de6600f2d242ef5cc491760b5cc54359b3242da..5be90f05018331389eddcbee6a33e2a9dbfa9061 100644 (file)
@@ -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 {
index d25d0081c56658b6c0f481a55eb93a7efcbbc187..f62404e60e69e55d7dad756cabd9d2e620e34999 100644 (file)
@@ -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
 }
index 03ab94e5908f68957c793f95a9f16ddc8738c0fc..8d5d8e8dc9b7dbec63d832211807dd4480f821bb 100644 (file)
@@ -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)
 
index 1063280ea2656894c8153f7d5f563754eb68e269..de2084c4e8187baa3d52ae9dc0323d8c128ba662 100644 (file)
@@ -22,6 +22,6 @@
 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() { }
index 40625fc82aa90e91523f394fcb79072833391b15..6dc5f39cb30dfa05a8cc741781deed0fd0bffefe 100644 (file)
@@ -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() { }
index 7e05c6462ffa6d5b6b8eb7a7bfcb23405a99541c..d4bb8de13d056fc84ff13e5eb52853f66520524b 100644 (file)
@@ -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() { }
index c032fb43402f922cc2a064df056439690f450e37..dcd49e34bb26c9f0a7678be2871f27a502cba55f 100644 (file)
@@ -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`
index ed18ed62111cc5f75e9377abc03619fa294028b4..b9224e7be7f12eddf404f034462e1ccabf2f7305 100644 (file)
@@ -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 };
 }
 
index b618cd07760d61cbf268f16d883cab95ee500605..d3339c4845ab276b28b9794861486f2ca7233f56 100644 (file)
@@ -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() {}
index 0a3ce03f27bf0f9a3289a3c608dd93004b5b42aa..b034fedb805e343b85ae4024275185aa8f033a70 100644 (file)
@@ -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
index d767fc3263624711cb687c4639aadc2962b65ee8..129c859b91954af02c9a70040f12f51d6df9ddd1 100644 (file)
@@ -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
 }
 
 
index 6b81804e028be89cbf49f2681d7bf9b04e066109..56fb38611735d1aab226000c83f070ce82a941bd 100644 (file)
@@ -17,7 +17,7 @@
 
 #[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() {}
index 3e6428c7d579b8843aaec9085f658e0334880d16..68d9795710245f7aa66b43e96298f35d6bbfa786 100644 (file)
@@ -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;
index 6e2380da6a13c7b254a6c4483c8bdea8d7f16c88..241fabf053c0bdc0cd26736027fe887e64abc88e 100644 (file)
@@ -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
 }
index ab874d4e877c05e70fe51d0776685d9e6ef3e6bd..2d21d0ebc760b5579e6c47aa501b2f2b6257d01f 100644 (file)
@@ -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
 }
index 2413bbae84c065fd41387b3a4ccc8d6ff15c657e..9a3ea54a3a4559c54cc6de17e1682b396afacb45 100644 (file)
@@ -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
 }
index 0b9d99396f7c4dd84421927de777871b7a38e690..f508364d75115fa74f7a10baab0c7f6f6a658a55 100644 (file)
@@ -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
 }
index 36bd1a98ca9192dd11ba015c8ac176f4a176577a..8fafd78d407969ec26ee9b2cdf998a2554789a3f 100644 (file)
@@ -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() { }
index 37500871563585669ab3e519e83db508fae84f4f..bd5fd3ee3b71eff738117678b3e34f4cf2da068c 100644 (file)
@@ -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() { }
index 89ed960c8913ba87b8ccd18b82ea07de4a00a4d6..576368aef312f08de60da9e319558cc6f58feffa 100644 (file)
@@ -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
 }
index 8b127ca179585771111ef549d563cceb3866af25..96ad184fd355840c602ab11ce998a3ca7cca3a43 100644 (file)
@@ -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);
     }
 }
index 270e6b9f183a7a7c94521f1612c53fb4800e3471..aec950f992cf4c160dc98536c2706f3320d4180e 100644 (file)
@@ -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() { }
index 24e59e6c29e353dd24965a85b09163173d4c6e8f..fcfbeefced06bd184bc9787ff7b17bd4162075c0 100644 (file)
@@ -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)
index dd14d0c91545880f5850977f0c645b44404e91b0..9b9bae92c33c1b43e62ca20781292f9b1e06f170 100644 (file)
@@ -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
 }
index 12696585a9e619f8865303afab1d8c5d62e330d9..f90365b71ae55fa617102acea28ae95a6e07691c 100644 (file)
@@ -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 }
 }
 
index f8979686038b00c2ef8239e1b7bf8f4cd9c5fd79..354d7b936485bd0505c02eb71758860d5400d5a4 100644 (file)
@@ -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
 
index 20da46dcaa29be76eab2d0ba248ef732be4fc8c8..446514c8dd45fd186322919d4b4bb5b72d8658d2 100644 (file)
@@ -13,5 +13,5 @@
 
 fn main() {
     () <- 0;
-    //~^ ERROR: `() : std::ops::Placer<_>` is not satisfied
+    //~^ ERROR: `(): std::ops::Placer<_>` is not satisfied
 }
index 6f4e9887dc6e619b0f89ca6c69a78e588a30d0c9..84452accc9a4ac4abec7e0134f6a81c628cbaf24 100644 (file)
@@ -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
 }
index c6c1a0fd17781ab1209e1a4923073f294e043ba9..c4d88267032920c59648ad43977aaa394d225e9f 100644 (file)
@@ -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
     }
 }
 
index 790000a3f9234702aede2023d1ba0ffb4e18b418..41349d7d7443b056bcaeb16498090e66b22ca71e 100644 (file)
@@ -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
     {
     }
index 79d2224aad6f5465edf9e207f6f220970f3b0574..6c41450796c749edad9e4c630bef2fa2e6526d96 100644 (file)
@@ -19,7 +19,7 @@ pub fn foo(value: *const X) -> *const X {
 }
 
 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
 
index edd9b6e0c066edde6ad29642bf76422e79ac5d8d..0fe01ece558ee0d9a4b8f3fbdcc431252dc932d2 100644 (file)
@@ -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
 }
index 1bb3b794135238797fdb670cff6da72a704d095a..790329cd2e429f13897329353c166236791268d1 100644 (file)
@@ -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() {}
index 56a66ecc8aa456898fe8080bd999e14f32990120..23be4d3536117fe50a594e3607af41dcb7780b83 100644 (file)
@@ -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() {
         }
index 6b40811bf04f8934150b9304954bcd41a609bd1c..33d68c121bf2674a9d11e854690129b1b5a284fe 100644 (file)
@@ -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!()
index 5318b18be5c7ffdf034eb183df17b97d99e86c07..a3ad76e1be06bb28bdc54983103620cde25e0be5 100644 (file)
@@ -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 {
index 2742162de531e08210563cd83aae949f424ad8d6..3e21360721b6d87a9076a72e7efdea81fe9d0405 100644 (file)
@@ -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() {}
index f37693d8a584ec8c50e44d35dbc75fd3018bb61e..8fbe4432204a49c0810cea899c13cbe0614aafae 100644 (file)
@@ -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
 }
index c8d7bcaecf93319501282036896c52dd3f159e65..02c925f336eae8fa20cde1a07638797a6691d096 100644 (file)
@@ -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
 }
index c0252deda24ce7f31b780a0ce1f12d13bbc75123..dfec48e0a83c1359411bf1e9bfa549be7fab0469 100644 (file)
@@ -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
 }
index a54fc0a314b61a4859b75806340fb48ac11f2a38..b02757fb5a3133acdf5f81f1fdda9a98f644d0bd 100644 (file)
@@ -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)
index 5e60e2a36f62362edac5259a1c2310acf91b618c..b2f3a2da516194a1762fe2948529cf1518592363 100644 (file)
@@ -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
 }
index 2634370fe902af293dcbc0442fe240b4db25c9cd..b7c544c78483aa7b6cd245d1251a7f63a948c9d6 100644 (file)
@@ -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() {}
index 7d9ae0543c752aae2c1f00d93e7e980378601e0b..0de0ab2269bff833471de2cd6daa791d4ca6a2ab 100644 (file)
@@ -16,6 +16,6 @@ fn hash<T>(&self, _: T) {}
 
 #[derive(Hash)]
 struct Foo(Bar);
-//~^ error: `Bar : std::hash::Hash` is not satisfied
+//~^ error: `Bar: std::hash::Hash` is not satisfied
 
 fn main() {}
index 7bc4adfa85d0b086cb87b4071f18ad7b59912f7d..e880a8b212bbc101255d60147d62756d9ff85320 100644 (file)
@@ -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>>
index f4e536144720e40f2704a5e0ee62bd375949fd6c..2c5b18a8113f7ac7d95ccb18648da5facb75165f 100644 (file)
@@ -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>>
index 2f0611a2086e740d7f38d2596b38b21afd85b964..cb0baee0a8787d538d5f484dc4bd15f34014cf55 100644 (file)
@@ -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
 }
index 29bef8c966a4cfd33b7ccddc4db97d08a153e242..3e0ab6d89212a54f328d5915ac49eff0dc8cf5c9 100644 (file)
@@ -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
     };
 }
index 9d0b559d13d36c9662e66672636139833d3ac469..1c255b4e6314a0b51d9ed5d5cbb0584eb544a8f0 100644 (file)
@@ -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
 }
index 49f024399c7e75bc93ce27a24a119ed4d734393d..16d7ea468466d703e07e9fcafae4627fe5d91a70 100644 (file)
@@ -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() {}
index aac282370c6466f6066f8017810601bcd8de5a21..5dded2b1e16973e9cf259805273a349894313de7 100644 (file)
 
 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
 }
index 64bfa232f3ffd0220c86a45f717919005be18ef6..0ecaa409412a62a92fc6cfb863134b864926648d 100644 (file)
@@ -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`
 }
index 118644ef2cb60706fb51526042e1a1403bac2c9c..83ff95cc2ea48f59c0086e69e970eb4a3aa1752f 100644 (file)
@@ -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() {}
index 0058d5af62e4ee80c9209fef19f60ac2b433b78e..019a7bdc734d4be95e48aac78050987589613d81 100644 (file)
@@ -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 }
 }
 
index c676c95ad25ea3f064401ffb4767597577a67693..95bbd4eccf4ff08cebdb83bcad077d0847a4ebbf 100644 (file)
@@ -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
 }
index 8d4ebbe720717cd94a1400ae50eb99beeb38f6b1..16b407baad178eece4faea4a35123d70b206a406 100644 (file)
@@ -16,6 +16,6 @@
 // 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() { }
index cf51e9bd60817b7c7bf1e28d396d512810e5807f..1cf970e150d7033da338ec5b79e80ec5a6056c8a 100644 (file)
@@ -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
 }
index c7eca74f7800c24a4843527bc07c11cc972213cd..ecee2e0a4c63ae4c6ad976f475cb351549e89338 100644 (file)
@@ -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() {
index b2957a71a56c795d117731315af47b6d3651bec3..a419c6480e6a7e1460ad7e1c6a5eeee29fbd14a5 100644 (file)
@@ -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
 }
index bb2fdbc555b7dfd47bc2276bd7950541bd8db189..cafcabe6279b0b6f0ca675c437302bd1883bb616 100644 (file)
@@ -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
 }
index 81d174256ee2a0d24d9a48ab8086da4047690371..334952cefa6e02f9612f3e761db590f966a07159 100644 (file)
@@ -33,7 +33,7 @@ fn foo(x: Port<()>) -> foo {
     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);
     });
index 966d932f2a41a4048ab26ffee511214ac3ff9291..902710e96e274fbc0ffc8a83d61e739741ff1ded 100644 (file)
@@ -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
 }
index b6c7e1ad05af4559572f093e9ea8bee106fead09..69f6fcdc4afa6577b8a0cbeb232f7ea4b758ec7a 100644 (file)
@@ -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
 }
index 037753e6c5fa6965913f2ac96a5a556b839e057f..b2ca4f9f5db16bb76a749cf8478733ded2a68b5e 100644 (file)
@@ -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
 }
index be52dd41826416c9f0013c8edffc2c66b84015fd..ae9a25a95b4ea99283139f6e0c73e4e96b423962 100644 (file)
@@ -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
 }
index 944bcb48ab05ff2ce1fa0f16a8099071b48bfa63..d64d37a2f6c33785e120c424f50aa99129622186 100644 (file)
@@ -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
 }
index 3955e3a040c5f3159289a748d16060b969c12b9b..aa7a83a7baac9a3cd557af95b9ab386e28d7391a 100644 (file)
@@ -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
 }
index 6673a87e9e4e47362bfa77db2768e6320352a1d6..6fa261dea71cb83cbb39b4f3e6ca544d516e2716 100644 (file)
@@ -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() {}
index 0006b29979cad31ba7d47090bacbd7e6b2f77391..c84927ea266394e41e25e4a14415857a10dff276 100644 (file)
@@ -31,11 +31,11 @@ struct Guard<'a, T: 'a> {
 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() {}
index 25b7465a1641f004079c3793bce4c3bf7b4d4ccd..895d2450cfed6c570c5ca2f72ee7594fe4caa64b 100644 (file)
@@ -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
 }
index b12e26fddf6d20a86175441a6aaab8bb8428040f..adc870224037802c1e7c10c1eeb93bc79f64dc42 100644 (file)
@@ -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.
index 3553d0dab312694e932e8a6c10a0c11bb0184884..88441594a7e9345f0f460fb994d35f5538205f0f 100644 (file)
@@ -25,5 +25,5 @@ fn drop(&mut self) {
 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
 }
index 61fa3cbfe69e00998ebdeeb28be8fad263df8547..b972a09b5c4908fa9e200d0888fbbb1f64fe33b3 100644 (file)
@@ -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
 }
index f372a17e045c02f3d4caa7ca9deffc7d90a8b266..8851e5e07973cd597d9cfcd3a390976c58ae9651 100644 (file)
@@ -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 (file)
index 0000000..0ee7e67
--- /dev/null
@@ -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
+}
index fd0c2ddb5025dee8b8f83bfeed1a49a166bdcad6..3fffb2e19f289c5c96c390a30b7788d62b6f3cdf 100644 (file)
@@ -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 @@ fn test4_fn<T: Eq + Ord>(&self) {}
 
     // 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> {
index 01910939a80ebd6af13a30eb67a4e1a4646e0438..8d587b29ba989331d57800761c613be2056ab41d 100644 (file)
@@ -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}
     }
 }
index 0a771ecf63f18a0b079d9bd2cdf962f99755b5be..fd46d1a62962c5c5518f6b916dfb7c2dfe8eb8e2 100644 (file)
@@ -15,7 +15,7 @@ fn dummy(&self) { }
 // 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() { }
index 8dd38544d3c9e86baa8a94c285b702947ec01c07..24e2418e8d45e97ce88c5148f13340d965043ce0 100644 (file)
@@ -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() {}
 }
 
index 85c26368f9f2c24daa41a44755fe7bab5dadde47..dd64085f6f6668a17d8ab42553a0a61b0ab2659f 100644 (file)
@@ -25,6 +25,6 @@ fn f(&self, x: &'static str) {
 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);
 }
index 8827cccd0f365984d882a702115f0eaf9580af6d..6950bce7304c0256cca77c90114392471240b268 100644 (file)
 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`
index 4a266dd07e6b95d03b59f0d1da392ff459a4ff1d..8014f92e1734438b5765e21caaaeb77f01395927 100644 (file)
@@ -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 @@ impl !Send for TestType {}
     // 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
 }
index 244f75a35926252e44c3bdd8da5311d4b6f36af3..3fc0d638dd6f1880be39caa81b4c71bdb4e4e35c 100644 (file)
@@ -33,21 +33,21 @@ fn same_as(&self, t: u64) -> bool { *self == (t as 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
 }
index 93800d3907a6796a3c9f758e642ef7d33d4b0668..8a46d6c76c30fad5dd6a9a20c8c87c4b893ff544 100644 (file)
@@ -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
 }
index a49047524e665631a2b830e686c9db25f3b0b5a8..3d7746b369cc0a65315df93151bf3a63da5f2956 100644 (file)
@@ -29,5 +29,5 @@ fn main() {
     is_mytrait::<MyS>();
 
     is_mytrait::<MyS2>();
-    //~^ ERROR `MyS2 : MyTrait` is not satisfied
+    //~^ ERROR `MyS2: MyTrait` is not satisfied
 }
index 0158cbcfcda8f9383c0a5d0a36b76c8cb98e97e1..853718f1e77d08ddcc68ca765eaa4173550cc76e 100644 (file)
@@ -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
 }
index 6cfc9bc5f5eceb990f076350b2ef6f6e61590525..cdf787a60ad43a9f7a58c716e1a400838f713c5e 100644 (file)
@@ -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
 }
index 98e617ee6659eaeb108ff6aeeab50a81059de352..8c2658b89a506f0cb3f49269544ff27c067c1349 100644 (file)
@@ -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>();
 }
index 109b2ed24ea13dc499f6657ed3a531ce89f3e294..66c7a1c75ffe47a71ea93ddbd6b75247f46d941e 100644 (file)
@@ -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
 }
index 81c4a3c5a5190a225e8c64c2ea31a54d52736ec8..0b071a9acd0921cedcbde0626bd524e65b6c435f 100644 (file)
@@ -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
 }
index 29379d549611dc94c099fc4768a9b87f3e138fd5..3085f45a83dd1f3d393376232ec540dbb445ea72 100644 (file)
@@ -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() {
index a3a80e17e403bab1e082a345d03484436e6b02ff..47e87c09d12b1c7e1f908ca155a5016c195da1f0 100644 (file)
@@ -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.
 }
 
index f34bae3be3ca0b486e9019f4287ffee3805a8529..6047f6770a7bdc17422c88bdb54f1e182f4ecc96 100644 (file)
@@ -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
 }
index 792c4a8ca3c7c5707b803888ed5253e3047ebfc8..94a98b1582af102c9851de6b226a739bf6db8890 100644 (file)
@@ -12,7 +12,7 @@
 
 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);
index 49642ac1490c82f597e42649b49b2a160b068876..3dcc7d248d72db316eb7848174d9f19ae48c38de 100644 (file)
@@ -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() { }
index bd5b705511d4fd5165840402557a5c026eca02cd..61b2b01b355841d5b998bbd74d1e882a23f983fc 100644 (file)
@@ -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.
 
index 94f15033cb705f9caf6b881aacc34c2be1065e0a..bbefb2fcecd80f7ba78fcd03abedf8d7fa702e7e 100644 (file)
@@ -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.
 
index bd420d940d51dd88d0961981ee08981983824e4c..ad5e4c2daef9ea010cc8eb8f086f7a2721195e53 100644 (file)
@@ -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() { }
index 061f0695df7df3f7d0210292f7a1774a8ef26ab0..f88165c02e988cd5e34bc3af44292b6cdb0d2a9c 100644 (file)
@@ -15,7 +15,7 @@
 // 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 @@ fn foo(&self) { }
 }
 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() {
index 1abc45d5df81d7805f94d95993310cd3a3eda5ab..3e6c9cc4061e1cb8ff7a02bf94e5048404f4d410 100644 (file)
 // 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() {
index 7545794bd23e3ec5d52b456fa3a42ddb7a64051e..663cb0a17161a6b26263bc3f6b7a8f090c77bcce 100644 (file)
@@ -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() {
 }
index 5aa1f1336796b684ab59088d61ad72959ebc2b69..25868c594feb675326960008eff1724b43b84763 100644 (file)
@@ -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() { }
index e32cb32a74d6bac62074fe84801a17fabb8b3190..eb0baff0005ddd53ce54853b1f31223495b7d2b2 100644 (file)
@@ -24,7 +24,7 @@ fn gimme_an_a<A:TraitA>(&self, a: A) -> 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() {
index 2fee2604a8a8cbff7a5df3c5ea999b97505222e9..1e82f609d2a7f7e91a0cf4a329137f449c120ef6 100644 (file)
@@ -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]
index 4b85f2275a75bea1481e04e75467d997eeedd272..458ee6694247e29baf6c6010a11a8973cadffb7e 100644 (file)
@@ -21,7 +21,7 @@ fn needs_copy(self) where T: Copy {
 
     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
     }
 }
 
index f55586982bee2c6697adb67b639b1ad758f57936..b3f99f2ae253d9f026b779179f5afd40f918bca5 100644 (file)
@@ -26,7 +26,7 @@ fn needs_copy(self) where T: Copy {
 
     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
     }
 }
 
index 9f217f29bd187df460c4e3b371dc6b1d8518ff51..05a58daf906881b9fbe42e50d40c5c0a3e5baa07 100644 (file)
@@ -28,5 +28,5 @@ fn method<U>(&self) where X: Foo<U> {
 
 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
 }
index 34ff872ac15fa3fb7e5024a48f6757b7bb55b204..1ac03330afd195e06fd25392afffee75567818b3 100644 (file)
@@ -26,5 +26,5 @@ fn equals(&self, u: &Foo<T>) -> bool where T : Eq {
 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
 }
index 38470bc3de67465d4fc9bb5ec9aa56faa951f05b..278a8db4e1ad481ddb518c4b01fc46926315a145 100644 (file)
@@ -15,5 +15,5 @@ fn equal<T>(_: &T, _: &T) -> bool where T : Eq {
 
 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
 }
index 1baaed3dd37835781ec91fe42d2edec001e5339d..bf8fc29217338bf2e6e953ccac2ec4eb608ea196 100644 (file)
@@ -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
 }