diff --git a/src/doc/book/closures.md b/src/doc/book/closures.md index 2afe995aeea..1b7a0da0112 100644 --- a/src/doc/book/closures.md +++ b/src/doc/book/closures.md @@ -371,14 +371,13 @@ assert_eq!(6, answer); This gives us these long, related errors: ```text -error: the trait `core::marker::Sized` is not implemented for the type -`core::ops::Fn(i32) -> i32` [E0277] +error: the predicate `core::ops::Fn(i32) -> i32 : core::marker::Sized` is not satisfied [E0277] fn factory() -> (Fn(i32) -> i32) { ^~~~~~~~~~~~~~~~ note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time fn factory() -> (Fn(i32) -> i32) { ^~~~~~~~~~~~~~~~ -error: the trait `core::marker::Sized` is not implemented for the type `core::ops::Fn(i32) -> i32` [E0277] +error: the predicate `core::ops::Fn(i32) -> i32 : core::marker::Sized` is not satisfied [E0277] let f = factory(); ^ note: `core::ops::Fn(i32) -> i32` does not have a constant size known at compile-time diff --git a/src/doc/book/concurrency.md b/src/doc/book/concurrency.md index 87d551b68df..8b918d3cfef 100644 --- a/src/doc/book/concurrency.md +++ b/src/doc/book/concurrency.md @@ -231,8 +231,8 @@ fn main() { This won't work, however, and will give us the error: ```text -13:9: 13:22 error: the trait `core::marker::Send` is not - implemented for the type `alloc::rc::Rc>` +13:9: 13:22 error: the predicate `alloc::rc::Rc> : core::marker::Send` + is not satisfied ... 13:9: 13:22 note: `alloc::rc::Rc>` cannot be sent between threads safely diff --git a/src/doc/book/traits.md b/src/doc/book/traits.md index 2a164077683..00aa33a9308 100644 --- a/src/doc/book/traits.md +++ b/src/doc/book/traits.md @@ -154,7 +154,7 @@ print_area(5); We get a compile-time error: ```text -error: the trait `HasArea` is not implemented for the type `_` [E0277] +error: the predicate `_ : HasArea` is not satisfied [E0277] ``` ## Trait bounds on generic structs @@ -496,7 +496,7 @@ impl FooBar for Baz { If we forget to implement `Foo`, Rust will tell us: ```text -error: the trait `main::Foo` is not implemented for the type `main::Baz` [E0277] +error: the predicate `main::Baz : main::Foo` is not satisfied [E0277] ``` # Deriving diff --git a/src/doc/book/vectors.md b/src/doc/book/vectors.md index e96dddf8c82..c98274a6649 100644 --- a/src/doc/book/vectors.md +++ b/src/doc/book/vectors.md @@ -56,8 +56,8 @@ v[j]; Indexing with a non-`usize` type gives an error that looks like this: ```text -error: the trait `core::ops::Index` is not implemented for the type -`collections::vec::Vec<_>` [E0277] +error: the predicate `collections::vec::Vec<_> : core::ops::Index` +is not satisfied [E0277] v[j]; ^~~~ note: the type `collections::vec::Vec<_>` cannot be indexed by `i32` diff --git a/src/doc/nomicon/coercions.md b/src/doc/nomicon/coercions.md index 1d2897ce3bd..3fb7f620eee 100644 --- a/src/doc/nomicon/coercions.md +++ b/src/doc/nomicon/coercions.md @@ -64,7 +64,7 @@ fn main() { ``` ```text -:10:5: 10:8 error: the trait `Trait` is not implemented for the type `&mut i32` [E0277] +:10:5: 10:8 error: the predicate `&mut i32 : Trait` is not satisfied [E0277] :10 foo(t); ^~~ ``` diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index 6f06efd0f9f..51c453c784e 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -1006,8 +1006,7 @@ fn some_func(foo: T) { fn main() { // we now call the method with the i32 type, which doesn't implement // the Foo trait - some_func(5i32); // error: the trait `Foo` is not implemented for the - // type `i32` + some_func(5i32); // error: the predicate `i32 : Foo` is not satisfied } ``` diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index cbcac7f9aa4..82b5dc66f7c 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -13,10 +13,12 @@ use super::{ FulfillmentErrorCode, MismatchedProjectionTypes, Obligation, + ObligationCause, ObligationCauseCode, OutputTypeParameterMismatch, TraitNotObjectSafe, PredicateObligation, + SelectionContext, SelectionError, ObjectSafetyViolation, MethodViolationCode, @@ -26,8 +28,9 @@ use super::{ use fmt_macros::{Parser, Piece, Position}; use middle::def_id::DefId; use infer::InferCtxt; -use ty::{self, ToPredicate, ToPolyTraitRef, TraitRef, Ty, TyCtxt, TypeFoldable}; +use ty::{self, ToPredicate, ToPolyTraitRef, Ty, TyCtxt}; use ty::fast_reject; +use ty::fold::{TypeFoldable, TypeFolder}; use util::nodemap::{FnvHashMap, FnvHashSet}; use std::cmp; @@ -100,9 +103,10 @@ pub fn report_projection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, } } -fn report_on_unimplemented<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, - trait_ref: &TraitRef<'tcx>, - span: Span) -> Option { +fn on_unimplemented_note<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, + trait_ref: ty::PolyTraitRef<'tcx>, + span: Span) -> Option { + let trait_ref = trait_ref.skip_binder(); let def_id = trait_ref.def_id; let mut report = None; for item in infcx.tcx.get_attrs(def_id).iter() { @@ -357,14 +361,20 @@ pub fn report_selection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, let trait_ref = trait_predicate.to_poly_trait_ref(); let mut err = struct_span_err!( infcx.tcx.sess, obligation.cause.span, E0277, - "the trait `{}` is not implemented for the type `{}`", - trait_ref, trait_ref.self_ty()); + "the predicate `{}` is not satisfied", + trait_ref.to_predicate()); - // Check if it has a custom "#[rustc_on_unimplemented]" - // error message, report with that message if it does - let custom_note = report_on_unimplemented(infcx, &trait_ref.0, - obligation.cause.span); - if let Some(s) = custom_note { + // Try to report a good error message. + + if !trait_ref.has_infer_types() && + predicate_can_apply(infcx, trait_ref) + { + err.fileline_help(obligation.cause.span, &format!( + "consider adding a `where {}` bound", + trait_ref.to_predicate() + )); + } else if let Some(s) = on_unimplemented_note(infcx, trait_ref, + obligation.cause.span) { err.fileline_note(obligation.cause.span, &s); } else { let simp = fast_reject::simplify_type(infcx.tcx, @@ -644,6 +654,55 @@ pub fn maybe_report_ambiguity<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, } } +/// Returns whether the trait predicate may apply for *some* assignment +/// to the type parameters. +fn predicate_can_apply<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, + pred: ty::PolyTraitRef<'tcx>) + -> bool +{ + struct ParamToVarFolder<'a, 'tcx: 'a> { + infcx: &'a InferCtxt<'a, 'tcx>, + var_map: FnvHashMap, Ty<'tcx>> + } + + impl<'a, 'tcx> TypeFolder<'tcx> for ParamToVarFolder<'a, 'tcx> + { + fn tcx(&self) -> &TyCtxt<'tcx> { self.infcx.tcx } + + fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> { + if let ty::TyParam(..) = ty.sty { + let infcx = self.infcx; + self.var_map.entry(ty).or_insert_with(|| infcx.next_ty_var()) + } else { + ty.super_fold_with(self) + } + } + } + + infcx.probe(|_| { + let mut selcx = SelectionContext::new(infcx); + + let cleaned_pred = pred.fold_with(&mut ParamToVarFolder { + infcx: infcx, + var_map: FnvHashMap() + }); + + let cleaned_pred = super::project::normalize( + &mut selcx, + ObligationCause::dummy(), + &cleaned_pred + ).value; + + let obligation = Obligation::new( + ObligationCause::dummy(), + cleaned_pred.to_predicate() + ); + + selcx.evaluate_obligation(&obligation) + }) +} + + fn need_type_info<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>, span: Span, ty: Ty<'tcx>) diff --git a/src/test/compile-fail/associated-types-ICE-when-projecting-out-of-err.rs b/src/test/compile-fail/associated-types-ICE-when-projecting-out-of-err.rs index c5a47f3e535..48bfa84fa86 100644 --- a/src/test/compile-fail/associated-types-ICE-when-projecting-out-of-err.rs +++ b/src/test/compile-fail/associated-types-ICE-when-projecting-out-of-err.rs @@ -31,5 +31,5 @@ trait Add { fn ice(a: A) { let r = loop {}; r = r + a; - //~^ ERROR not implemented + //~^ ERROR E0277 } diff --git a/src/test/compile-fail/associated-types-bound-failure.rs b/src/test/compile-fail/associated-types-bound-failure.rs index adccd73beae..cd21fb949cb 100644 --- a/src/test/compile-fail/associated-types-bound-failure.rs +++ b/src/test/compile-fail/associated-types-bound-failure.rs @@ -24,7 +24,7 @@ pub trait GetToInt fn foo(g: G) -> isize where G : GetToInt { - ToInt::to_int(&g.get()) //~ ERROR not implemented + ToInt::to_int(&g.get()) //~ ERROR E0277 } fn bar(g: G) -> isize 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 9c173515793..a8aee5fd0a5 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(&self, foo: U, bar: ::Value) {} - //~^ ERROR the trait `Get` is not implemented for the type `Self` + //~^ ERROR the predicate `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 d48cff405a6..32068633df6 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 { fn f>(t: &T) { let u: >::Bar = t.get_bar(); - //~^ ERROR the trait `Foo` is not implemented for the type `T` + //~^ ERROR the predicate `T : Foo` 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 fd60896c298..19f0e27fa55 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(foo: ::Value) {} - //~^ ERROR the trait `Get` is not implemented for the type `T` + //~^ ERROR the predicate `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 bda16c8a85d..63e76f7eeaa 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(&self, foo: U, bar: ::Value) {} - //~^ ERROR the trait `Get` is not implemented for the type `Self` + //~^ ERROR the predicate `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 0b1d6a5b71a..38f5be37bd1 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(&self, foo: U, bar: ::Value) {} - //~^ ERROR the trait `Get` is not implemented for the type `Self` + //~^ ERROR the predicate `Self : Get` is not satisfied } impl Other for T { fn uhoh(&self, foo: U, bar: <(T, U) as Get>::Value) {} - //~^ ERROR the trait `Get` is not implemented for the type `(T, U)` + //~^ ERROR the predicate `(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 c9374d42938..ee228899bb3 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 the trait `Foo` is not implemented + //~^ ERROR `u32 : Foo` is not satisfied } pub fn f1_uint_int() { f1(2u32, 4i32); - //~^ ERROR the trait `Foo` is not implemented + //~^ 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 a32d4de7755..468b40e6971 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: T) { - let x = t.get(); //~ ERROR the trait `std::marker::Sized` is not implemented + let x = t.get(); //~ ERROR `::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 224187c8ac4..4de6600f2d2 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() { - 1.bar::(); //~ ERROR `std::marker::Send` is not implemented + 1.bar::(); //~ 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 e9dd0585fa9..d25d0081c56 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 = Vec::new(); - //~^ ERROR the trait `std::marker::Sized` is not implemented - //~| ERROR the trait `std::marker::Sized` is not implemented - //~| ERROR the trait `std::marker::Sized` is not implemented + //~^ 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 e1bcc63fb2f..03ab94e5908 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 Foo for (T,) { } //~ ERROR the trait `std::marker::Send` is not implemented +impl Foo for (T,) { } //~ ERROR `T : std::marker::Send` is not satisfied -impl Foo for (T,T) { } //~ ERROR the trait `std::marker::Sync` is not implemented +impl Foo for (T,T) { } //~ ERROR `T : std::marker::Sync` is not satisfied impl 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 5e2ba7a3b9d..1063280ea26 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); impl RequiresShare for X { } impl RequiresRequiresShareAndSend for X { } -//~^ ERROR the trait `std::marker::Send` is not implemented +//~^ 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 7c9c0df412a..40625fc82aa 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 { } -//~^ ERROR the trait `std::marker::Send` is not implemented +//~^ ERROR `std::rc::Rc : 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 13ad1322346..7e05c6462ff 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 Foo for T { } //~ ERROR the trait `std::marker::Send` is not implemented +impl 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 9653a1357ef..2bc4d82ef0a 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 `std::marker::Sized` is not implemented for the type `[u8]` + //~^ ERROR the predicate `[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 `std::marker::Sized` is not implemented for the type `str` + //~^ ERROR the predicate `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 40085d81378..ed18ed62111 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 where F: FnOnce() + 'static + Send { } fn foo(blk: F) -> X where F: FnOnce() + 'static { - //~^ ERROR the trait `std::marker::Send` is not implemented for the type + //~^ 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 c8fe4a1b8d2..b618cd07760 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) where F: FnOnce() { fn give_owned(f: F) where F: FnOnce() + Send { take_any(f); - take_const_owned(f); //~ ERROR the trait `std::marker::Sync` is not implemented for the type + 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 7d4c618de66..eb063f5bc8c 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 { } // We don't always check where clauses for sanity, but in this case // wfcheck does report an error here: -fn vacuous() //~ ERROR the trait `Bar` is not implemented for the type `i32` +fn vacuous() //~ ERROR the predicate `i32 : Bar` is not satisfied where i32: Foo { // ... 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 4fc922d32a0..d767fc32636 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 the trait `std::clone::Clone` is not implemented for the type `NoCloneOrEq` + //~^ 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 e70a1613dc2..6b81804e028 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 `std::default::Default` is not implemented + 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 3c642bd8b70..3e6428c7d57 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; //~ ERROR the trait `std::marker::Sized` is not implemented + let box x = box 1isize as Box; //~ 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 110413cd322..6e2380da6a1 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 = Box::new(Bar1 {f: 36}); f5.ptr = *z; - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ 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 d4221adfa2a..ab874d4e877 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 the trait `std::marker::Sized` is not implemented for the type `ToBar` + //~| 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 2d87345db22..2413bbae84c 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 = &f1; let f3: &Fat = f2; - //~^ ERROR the trait `Bar` is not implemented for the type `Foo` + //~^ 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 9e23b6ea44e..0b9d99396f7 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 { ptr: *g }; - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ 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 68e6bc0ed76..36bd1a98ca9 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: &T) { let u: &Foo = t; - //~^ ERROR `std::marker::Sized` is not implemented for the type `T` + //~^ ERROR `T : std::marker::Sized` is not satisfied } fn test2(t: &T) { let v: &Foo = t as &Foo; - //~^ ERROR `std::marker::Sized` is not implemented for the type `T` + //~^ ERROR `T : std::marker::Sized` is not satisfied } fn test3() { let _: &[&Foo] = &["hi"]; - //~^ ERROR `std::marker::Sized` is not implemented for the type `str` + //~^ ERROR `str : std::marker::Sized` is not satisfied } fn test4(x: &[u8]) { let _: &Foo = x as &Foo; - //~^ ERROR `std::marker::Sized` is not implemented for the type `[u8]` + //~^ 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 0241c207c9d..37500871563 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 : Sized { fn take(self, x: &T) { } } // Note: T is sized impl Foo<[isize]> for usize { } -//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `[isize]` +//~^ ERROR `[isize] : std::marker::Sized` is not satisfied impl Foo for [usize] { } -//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `[usize]` +//~^ ERROR `[usize] : std::marker::Sized` is not satisfied pub fn main() { } diff --git a/src/test/compile-fail/error-should-say-copy-not-pod.rs b/src/test/compile-fail/error-should-say-copy-not-pod.rs index 14fe14ae367..8b1e2fc1966 100644 --- a/src/test/compile-fail/error-should-say-copy-not-pod.rs +++ b/src/test/compile-fail/error-should-say-copy-not-pod.rs @@ -13,5 +13,5 @@ fn check_bound(_: T) {} fn main() { - check_bound("nocopy".to_string()); //~ ERROR the trait `std::marker::Copy` is not implemented + check_bound("nocopy".to_string()); //~ ERROR : std::marker::Copy` is not satisfied } diff --git a/src/test/compile-fail/extern-wrong-value-type.rs b/src/test/compile-fail/extern-wrong-value-type.rs index 8437ff76691..89ed960c891 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 the trait `std::ops::Fn<()>` is not implemented for the type `extern "C" fn() - //~| ERROR the trait `std::ops::FnOnce<()>` is not implemented for the type `extern "C" fn() + //~^ 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/fn-trait-formatting.rs b/src/test/compile-fail/fn-trait-formatting.rs index 6309beaf4b5..8cbfc520ff4 100644 --- a/src/test/compile-fail/fn-trait-formatting.rs +++ b/src/test/compile-fail/fn-trait-formatting.rs @@ -34,6 +34,6 @@ fn main() { //~| found box needs_fn(1); - //~^ ERROR `std::ops::Fn<(isize,)>` - //~| ERROR `std::ops::FnOnce<(isize,)>` + //~^ ERROR : std::ops::Fn<(isize,)>` + //~| ERROR : std::ops::FnOnce<(isize,)>` } diff --git a/src/test/compile-fail/for-loop-bogosity.rs b/src/test/compile-fail/for-loop-bogosity.rs index de4dd422d4f..8b127ca1795 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 `std::iter::Iterator` is not implemented for the type `MyStruct` + for x in bogus { //~ ERROR `MyStruct : std::iter::Iterator` drop(x); } } diff --git a/src/test/compile-fail/hrtb-conflate-regions.rs b/src/test/compile-fail/hrtb-conflate-regions.rs index 3efe0501267..845429d4b0c 100644 --- a/src/test/compile-fail/hrtb-conflate-regions.rs +++ b/src/test/compile-fail/hrtb-conflate-regions.rs @@ -35,6 +35,6 @@ impl<'a> Foo<(&'a isize, &'a isize)> for SomeStruct } fn a() { want_foo1::(); } // OK -- foo wants just one region -fn b() { want_foo2::(); } //~ ERROR not implemented +fn b() { want_foo2::(); } //~ ERROR E0277 fn main() { } diff --git a/src/test/compile-fail/hrtb-higher-ranker-supertraits-transitive.rs b/src/test/compile-fail/hrtb-higher-ranker-supertraits-transitive.rs index 249256f8e01..b55dccec2d5 100644 --- a/src/test/compile-fail/hrtb-higher-ranker-supertraits-transitive.rs +++ b/src/test/compile-fail/hrtb-higher-ranker-supertraits-transitive.rs @@ -54,7 +54,7 @@ fn want_qux(b: &B) where B : Qux { want_foo_for_any_tcx(b); - want_bar_for_any_ccx(b); //~ ERROR not implemented + want_bar_for_any_ccx(b); //~ ERROR E0277 } fn main() {} diff --git a/src/test/compile-fail/hrtb-higher-ranker-supertraits.rs b/src/test/compile-fail/hrtb-higher-ranker-supertraits.rs index 441ad76b602..4c5add4acea 100644 --- a/src/test/compile-fail/hrtb-higher-ranker-supertraits.rs +++ b/src/test/compile-fail/hrtb-higher-ranker-supertraits.rs @@ -25,7 +25,7 @@ fn want_foo_for_some_tcx<'x,F>(f: &'x F) where F : Foo<'x> { want_foo_for_some_tcx(f); - want_foo_for_any_tcx(f); //~ ERROR not implemented + want_foo_for_any_tcx(f); //~ ERROR E0277 } fn want_foo_for_any_tcx(f: &F) @@ -42,7 +42,7 @@ fn want_bar_for_some_ccx<'x,B>(b: &B) want_foo_for_any_tcx(b); want_bar_for_some_ccx(b); - want_bar_for_any_ccx(b); //~ ERROR not implemented + want_bar_for_any_ccx(b); //~ ERROR E0277 } fn want_bar_for_any_ccx(b: &B) diff --git a/src/test/compile-fail/hrtb-just-for-static.rs b/src/test/compile-fail/hrtb-just-for-static.rs index a1ec4a739e8..270e6b9f183 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::() //~ ERROR `for<'a> Foo<&'a isize>` is not implemented + want_hrtb::() //~ 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 e8ecc0608fc..24e59e6c29e 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> Bar<&'a isize>` is not implemented for the type `T` + foo_hrtb_bar_not(&mut t); //~ ERROR `for<'a> T : Bar<&'a isize>` is not satisfied } fn foo_hrtb_bar_hrtb(mut t: T) diff --git a/src/test/compile-fail/ifmt-unimpl.rs b/src/test/compile-fail/ifmt-unimpl.rs index 19e019b58bc..dd14d0c9154 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: the trait `std::fmt::UpperHex` is not implemented + //~^ 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 8c8f67e40ab..12696585a9e 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 { fn get(&self) -> T; } -impl Getter for isize { //~ ERROR the trait `Clone2` is not implemented +impl Getter 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 8143ef84467..f8979686038 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) {} - [0][0u8]; //~ ERROR: the trait `std::ops::Index` is not implemented + [0][0u8]; //~ ERROR: `[_] : std::ops::Index` is not satisfied [0][0]; // should infer to be a usize diff --git a/src/test/compile-fail/integral-indexing.rs b/src/test/compile-fail/integral-indexing.rs index 047ab9d2a8f..897aca66cbf 100644 --- a/src/test/compile-fail/integral-indexing.rs +++ b/src/test/compile-fail/integral-indexing.rs @@ -13,14 +13,14 @@ pub fn main() { let s: String = "abcdef".to_string(); v[3_usize]; v[3]; - v[3u8]; //~ERROR the trait `std::ops::Index` is not implemented - v[3i8]; //~ERROR the trait `std::ops::Index` is not implemented - v[3u32]; //~ERROR the trait `std::ops::Index` is not implemented - v[3i32]; //~ERROR the trait `std::ops::Index` is not implemented + v[3u8]; //~ERROR : std::ops::Index` is not satisfied + v[3i8]; //~ERROR : std::ops::Index` is not satisfied + v[3u32]; //~ERROR : std::ops::Index` is not satisfied + v[3i32]; //~ERROR : std::ops::Index` is not satisfied s.as_bytes()[3_usize]; s.as_bytes()[3]; - s.as_bytes()[3u8]; //~ERROR the trait `std::ops::Index` is not implemented - s.as_bytes()[3i8]; //~ERROR the trait `std::ops::Index` is not implemented - s.as_bytes()[3u32]; //~ERROR the trait `std::ops::Index` is not implemented - s.as_bytes()[3i32]; //~ERROR the trait `std::ops::Index` is not implemented + s.as_bytes()[3u8]; //~ERROR : std::ops::Index` is not satisfied + s.as_bytes()[3i8]; //~ERROR : std::ops::Index` is not satisfied + s.as_bytes()[3u32]; //~ERROR : std::ops::Index` is not satisfied + s.as_bytes()[3i32]; //~ERROR : std::ops::Index` is not satisfied } diff --git a/src/test/compile-fail/issue-14084.rs b/src/test/compile-fail/issue-14084.rs index dfdbea5f76e..20da46dcaa2 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: the trait `std::ops::Placer<_>` is not implemented + //~^ 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 4019b265edd..6f4e9887dc6 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 the trait `std::marker::Sized` is not implemented for the type `str` +//~^ ERROR `str : std::marker::Sized` is not satisfied } diff --git a/src/test/compile-fail/issue-15756.rs b/src/test/compile-fail/issue-15756.rs index eca6b02dbdc..790000a3f92 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 the trait `std::marker::Sized` is not implemented for the type `[T]` +//~^ 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 3b819916fbd..79d2224aad6 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 the trait `std::marker::Sync` is not implemented for the type +//~^ 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 e079ef1ec12..edd9b6e0c06 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 the trait `std::marker::Sized` is not implemented for the type `[_]` + //~^ 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 4b53d84f305..1bb3b794135 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: the trait `std::marker::Sync` is not implemented +//~^ ERROR: `Foo : std::marker::Sync` is not satisfied fn main() {} diff --git a/src/test/compile-fail/issue-18107.rs b/src/test/compile-fail/issue-18107.rs index 03a165f18de..6b40811bf04 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: the trait `std::marker::Sized` is not implemented +//~^ 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 a662e9ca98e..5318b18be5c 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: ::State) { -//~^ ERROR the trait `HasState` is not implemented for the type `isize` +//~^ 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 11083453d05..2742162de53 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) { - //~^ ERROR: the trait `std::marker::Sized` is not implemented for the type + //~^ 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 8c75d4680fa..f37693d8a58 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() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR the trait `foo::core::clone::Clone` is not implemented for the type `foo::core:: + //~^ 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 c73a1735064..c8d7bcaecf9 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() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR the trait `bar::clone::Clone` is not implemented for the type `bar::sync::atomic:: + //~^ 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 0ef7747c8a8..c0252deda24 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() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR the trait `core::clone::Clone` is not implemented for the type `core::sync::atomic:: + //~^ 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 23b2532639b..a54fc0a314b 100644 --- a/src/test/compile-fail/issue-20005.rs +++ b/src/test/compile-fail/issue-20005.rs @@ -15,7 +15,7 @@ trait From { } trait To { - fn to( //~ ERROR the trait `std::marker::Sized` is not implemented + fn to( //~ ERROR `Self : std::marker::Sized` is not satisfied self ) -> >::Result where Dst: From { From::from(self) diff --git a/src/test/compile-fail/issue-20162.rs b/src/test/compile-fail/issue-20162.rs index c81bcb82824..5e60e2a36f6 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 = vec![]; b.sort(); - //~^ ERROR the trait `std::cmp::Ord` is not implemented for the type `X` + //~^ 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 c0eea477775..2634370fe90 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>) { for item in *things { *item = 0 } -//~^ ERROR the trait `std::marker::Sized` is not implemented for the type `std::iter::Iterator +//~^ ERROR `std::iter::Iterator : 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 f25f8721675..7d9ae0543c7 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: the trait `std::hash::Hash` is not implemented for the type `Bar` +//~^ 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 8ea63fdf176..452ae5df40a 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 `Foo` is not implemented for the type `Bar` + //~^ error: the predicate `Bar : Foo` is not satisfied //~| help: the following implementations were found: //~| help: > //~| help: > 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 9460ac19596..8f52004f598 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 `Foo` is not implemented for the type `Bar` + //~^ error: the predicate `Bar : Foo` is not satisfied //~| help: the following implementations were found: //~| help: > //~| help: > diff --git a/src/test/compile-fail/issue-21763.rs b/src/test/compile-fail/issue-21763.rs index e535567c52e..2f0611a2086 100644 --- a/src/test/compile-fail/issue-21763.rs +++ b/src/test/compile-fail/issue-21763.rs @@ -17,5 +17,5 @@ fn foo() {} fn main() { foo::, Rc<()>>>(); - //~^ ERROR: the trait `std::marker::Send` is not implemented for the type `std::rc::Rc<()>` + //~^ 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 a7283934710..29bef8c966a 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 the trait `std::ops::Fn<()>` is not implemented - //~| ERROR the trait `std::ops::FnOnce<()>` is not implemented + //~^ ERROR `() : std::ops::Fn<()>` is not satisfied + //~| ERROR `() : std::ops::FnOnce<()>` is not satisfied }; } diff --git a/src/test/compile-fail/issue-22645.rs b/src/test/compile-fail/issue-22645.rs index aa7fa82fa29..402b9a04496 100644 --- a/src/test/compile-fail/issue-22645.rs +++ b/src/test/compile-fail/issue-22645.rs @@ -22,6 +22,6 @@ impl Add for Bob { fn main() { let b = Bob + 3.5; - b + 3 //~ ERROR: is not implemented + b + 3 //~ ERROR E0277 //~^ ERROR: mismatched types } diff --git a/src/test/compile-fail/issue-25076.rs b/src/test/compile-fail/issue-25076.rs index 40f3b728496..9d0b559d13d 100644 --- a/src/test/compile-fail/issue-25076.rs +++ b/src/test/compile-fail/issue-25076.rs @@ -17,5 +17,5 @@ fn do_fold>(init: B, f: F) {} fn bot() -> T { loop {} } fn main() { - do_fold(bot(), ()); //~ ERROR is not implemented for the type `()` + do_fold(bot(), ()); //~ ERROR `() : InOut<_>` is not satisfied } diff --git a/src/test/compile-fail/issue-28098.rs b/src/test/compile-fail/issue-28098.rs index d81abd417f1..aac282370c6 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 the trait `std::iter::Iterator` is not implemented + //~^ ERROR `() : std::iter::Iterator` is not satisfied for _ in false {} - //~^ ERROR the trait `std::iter::Iterator` is not implemented + //~^ ERROR `bool : std::iter::Iterator` is not satisfied let _ = Iterator::next(&mut ()); - //~^ ERROR the trait `std::iter::Iterator` is not implemented + //~^ 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 the trait `std::iter::Iterator` is not implemented + //~^ ERROR `() : std::iter::Iterator` is not satisfied let _ = Iterator::next(&mut ()); - //~^ ERROR the trait `std::iter::Iterator` is not implemented + //~^ ERROR `() : std::iter::Iterator` is not satisfied for _ in false {} - //~^ ERROR the trait `std::iter::Iterator` is not implemented + //~^ ERROR `bool : std::iter::Iterator` is not satisfied } diff --git a/src/test/compile-fail/issue-5035-2.rs b/src/test/compile-fail/issue-5035-2.rs index a96eb0e721b..118644ef2cb 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: the trait `std::marker::Sized` is not implemented +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 cc6c797c766..0058d5af62e 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 the trait `std::marker::Sized` is not implemented - //~^ ERROR the trait `std::marker::Sized` is not implemented + -> 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 1293bf22b47..c676c95ad25 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}; - //~^ ERROR the trait `std::marker::Send` is not implemented + //~^ ERROR `std::rc::Rc> : 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 726f789983d..8d4ebbe7207 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> = box RefCell::new(0); //~^ ERROR allocations are not allowed in statics -//~| ERROR the trait `std::marker::Sync` is not implemented for the type +//~| ERROR `std::cell::RefCell : std::marker::Sync` is not satisfied fn main() { } diff --git a/src/test/compile-fail/kindck-copy.rs b/src/test/compile-fail/kindck-copy.rs index 4bc941628aa..08b4e1a45f3 100644 --- a/src/test/compile-fail/kindck-copy.rs +++ b/src/test/compile-fail/kindck-copy.rs @@ -34,14 +34,14 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::<&'a [isize]>(); // ...unless they are mutable - assert_copy::<&'static mut isize>(); //~ ERROR `std::marker::Copy` is not implemented - assert_copy::<&'a mut isize>(); //~ ERROR `std::marker::Copy` is not implemented + assert_copy::<&'static mut isize>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::<&'a mut isize>(); //~ ERROR : std::marker::Copy` is not satisfied // boxes are not ok - assert_copy::>(); //~ ERROR `std::marker::Copy` is not implemented - assert_copy::(); //~ ERROR `std::marker::Copy` is not implemented - assert_copy:: >(); //~ ERROR `std::marker::Copy` is not implemented - assert_copy::>(); //~ ERROR `std::marker::Copy` is not implemented + assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy:: >(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied // borrowed object types are generally ok assert_copy::<&'a Dummy>(); @@ -49,11 +49,11 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::<&'static (Dummy+Copy)>(); // owned object types are not ok - assert_copy::>(); //~ ERROR `std::marker::Copy` is not implemented - assert_copy::>(); //~ ERROR `std::marker::Copy` is not implemented + assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied // mutable object types are not ok - assert_copy::<&'a mut (Dummy+Copy)>(); //~ ERROR `std::marker::Copy` is not implemented + assert_copy::<&'a mut (Dummy+Copy)>(); //~ ERROR : std::marker::Copy` is not satisfied // unsafe ptrs are ok assert_copy::<*const isize>(); @@ -71,10 +71,10 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::(); // structs containing non-POD are not ok - assert_copy::(); //~ ERROR `std::marker::Copy` is not implemented + assert_copy::(); //~ ERROR : std::marker::Copy` is not satisfied // ref counted types are not ok - assert_copy::>(); //~ ERROR `std::marker::Copy` is not implemented + assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied } pub 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 c5c50789e40..cf51e9bd608 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(foo: &T) { } fn main() { let x: Box<_> = box 3; take_param(&x); - //~^ ERROR the trait `std::marker::Copy` is not implemented + //~^ ERROR `Box<_> : std::marker::Copy` is not satisfied } diff --git a/src/test/compile-fail/kindck-impl-type-params.rs b/src/test/compile-fail/kindck-impl-type-params.rs index a59c243f12a..53ad4d1163b 100644 --- a/src/test/compile-fail/kindck-impl-type-params.rs +++ b/src/test/compile-fail/kindck-impl-type-params.rs @@ -26,13 +26,13 @@ impl Gettable for S {} fn f(val: T) { let t: S = S(marker::PhantomData); let a = &t as &Gettable; - //~^ ERROR the trait `std::marker::Send` is not implemented + //~^ ERROR : std::marker::Send` is not satisfied } fn g(val: T) { let t: S = S(marker::PhantomData); let a: &Gettable = &t; - //~^ ERROR the trait `std::marker::Send` is not implemented + //~^ ERROR : std::marker::Send` is not satisfied } fn foo<'a>() { @@ -44,7 +44,7 @@ fn foo<'a>() { fn foo2<'a>() { let t: Box> = box S(marker::PhantomData); let a = t as Box>; - //~^ ERROR the trait `std::marker::Copy` is not implemented + //~^ ERROR : std::marker::Copy` is not satisfied } fn foo3<'a>() { @@ -52,7 +52,7 @@ fn foo3<'a>() { let t: Box> = box S(marker::PhantomData); let a: Box> = t; - //~^ ERROR the trait `std::marker::Copy` is not implemented + //~^ ERROR : std::marker::Copy` is not satisfied } fn main() { } diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index a207b872122..dd77c2c138f 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -18,5 +18,5 @@ fn bar(_: F) { } fn main() { let x = Rc::new(3); bar(move|| foo(x)); - //~^ ERROR `std::marker::Send` is not implemented + //~^ ERROR : std::marker::Send` is not satisfied } diff --git a/src/test/compile-fail/kindck-send-object.rs b/src/test/compile-fail/kindck-send-object.rs index 7525ff932bb..bd0e5642b9c 100644 --- a/src/test/compile-fail/kindck-send-object.rs +++ b/src/test/compile-fail/kindck-send-object.rs @@ -20,11 +20,11 @@ trait Message : Send { } fn object_ref_with_static_bound_not_ok() { assert_send::<&'static (Dummy+'static)>(); - //~^ ERROR the trait `std::marker::Sync` is not implemented + //~^ ERROR : std::marker::Sync` is not satisfied } fn box_object_with_no_bound_not_ok<'a>() { - assert_send::>(); //~ ERROR the trait `std::marker::Send` is not implemented + assert_send::>(); //~ ERROR : std::marker::Send` is not satisfied } fn object_with_send_bound_ok() { diff --git a/src/test/compile-fail/kindck-send-object1.rs b/src/test/compile-fail/kindck-send-object1.rs index 0e737e1b162..da56fccde2d 100644 --- a/src/test/compile-fail/kindck-send-object1.rs +++ b/src/test/compile-fail/kindck-send-object1.rs @@ -18,7 +18,7 @@ trait Dummy { } // careful with object types, who knows what they close over... fn test51<'a>() { assert_send::<&'a Dummy>(); - //~^ ERROR the trait `std::marker::Sync` is not implemented + //~^ ERROR : std::marker::Sync` is not satisfied } fn test52<'a>() { assert_send::<&'a (Dummy+Sync)>(); @@ -37,7 +37,7 @@ fn test61() { // them not ok fn test_71<'a>() { assert_send::>(); - //~^ ERROR the trait `std::marker::Send` is not implemented + //~^ ERROR : std::marker::Send` is not satisfied } fn main() { } diff --git a/src/test/compile-fail/kindck-send-object2.rs b/src/test/compile-fail/kindck-send-object2.rs index 7bc86df5739..e52a6e12efc 100644 --- a/src/test/compile-fail/kindck-send-object2.rs +++ b/src/test/compile-fail/kindck-send-object2.rs @@ -14,11 +14,11 @@ fn assert_send() { } trait Dummy { } fn test50() { - assert_send::<&'static Dummy>(); //~ ERROR the trait `std::marker::Sync` is not implemented + assert_send::<&'static Dummy>(); //~ ERROR : std::marker::Sync` is not satisfied } fn test53() { - assert_send::>(); //~ ERROR the trait `std::marker::Send` is not implemented + assert_send::>(); //~ ERROR : std::marker::Send` is not satisfied } // ...unless they are properly bounded diff --git a/src/test/compile-fail/kindck-send-owned.rs b/src/test/compile-fail/kindck-send-owned.rs index d7116930fb4..583381a1c28 100644 --- a/src/test/compile-fail/kindck-send-owned.rs +++ b/src/test/compile-fail/kindck-send-owned.rs @@ -19,7 +19,7 @@ fn test32() { assert_send:: >(); } // but not if they own a bad thing fn test40() { - assert_send::>(); //~ ERROR `std::marker::Send` is not implemented + assert_send::>(); //~ ERROR : std::marker::Send` is not satisfied } fn main() { } diff --git a/src/test/compile-fail/kindck-send-unsafe.rs b/src/test/compile-fail/kindck-send-unsafe.rs index bce765a986a..c7eca74f780 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() { } fn test71<'a>() { assert_send::<*mut &'a isize>(); - //~^ ERROR the trait `core::marker::Send` is not implemented for the type + //~^ 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 e298a0f62cd..b2957a71a56 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> = x; // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. let y: Box> = Box::new(x); - //~^ ERROR the trait `Map` is not implemented + //~^ ERROR `Box> : Map` is not satisfied } diff --git a/src/test/compile-fail/mut-not-freeze.rs b/src/test/compile-fail/mut-not-freeze.rs index a12a3615bc9..a24a91a4d54 100644 --- a/src/test/compile-fail/mut-not-freeze.rs +++ b/src/test/compile-fail/mut-not-freeze.rs @@ -15,5 +15,5 @@ fn f(_: T) {} fn main() { let x = RefCell::new(0); f(x); - //~^ ERROR `std::marker::Sync` is not implemented + //~^ ERROR `std::cell::RefCell<_> : std::marker::Sync` is not satisfied } diff --git a/src/test/compile-fail/mutable-enum-indirect.rs b/src/test/compile-fail/mutable-enum-indirect.rs index a7e751e7ea9..bb2fdbc555b 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) {} fn main() { let x = Foo::A(NoSync); - bar(&x); //~ ERROR the trait `std::marker::Sync` is not implemented + 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 2bb0343400c..81d174256ee 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::marker::Send` is not implemented + //~^ 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 7505bf69c83..966d932f2a4 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) {} fn main() { let x = Foo::A(NoSend); bar(x); - //~^ ERROR `std::marker::Send` is not implemented + //~^ 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 23926394a23..b6c7e1ad05a 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) {} fn main() { let x = Rc::new(5); bar(x); - //~^ ERROR `std::marker::Send` is not implemented + //~^ 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 14e18558a71..037753e6c5f 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) {} fn main() { let x = Foo { a: 5 }; bar(x); - //~^ ERROR the trait `std::marker::Send` is not implemented + //~^ 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 c9a3084a73e..be52dd41826 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) {} fn main() { let x = Foo::A(NoSync); bar(x); - //~^ ERROR the trait `std::marker::Sync` is not implemented + //~^ 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 74549286f7b..944bcb48ab0 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) {} fn main() { let x = Foo { a: 5 }; bar(x); - //~^ ERROR the trait `std::marker::Sync` is not implemented + //~^ ERROR `Foo : std::marker::Sync` is not satisfied } diff --git a/src/test/compile-fail/not-panic-safe-3.rs b/src/test/compile-fail/not-panic-safe-3.rs index 50a69543f7d..e5de03a0848 100644 --- a/src/test/compile-fail/not-panic-safe-3.rs +++ b/src/test/compile-fail/not-panic-safe-3.rs @@ -18,5 +18,5 @@ use std::cell::RefCell; fn assert() {} fn main() { - assert::>>(); //~ ERROR: is not implemented + assert::>>(); //~ ERROR E0277 } diff --git a/src/test/compile-fail/not-panic-safe-5.rs b/src/test/compile-fail/not-panic-safe-5.rs index 1fa76c21f85..0301c8dd935 100644 --- a/src/test/compile-fail/not-panic-safe-5.rs +++ b/src/test/compile-fail/not-panic-safe-5.rs @@ -17,5 +17,5 @@ use std::cell::UnsafeCell; fn assert() {} fn main() { - assert::<*const UnsafeCell>(); //~ ERROR: is not implemented + assert::<*const UnsafeCell>(); //~ ERROR E0277 } diff --git a/src/test/compile-fail/not-panic-safe.rs b/src/test/compile-fail/not-panic-safe.rs index f06464c5b1a..fd0f830a17d 100644 --- a/src/test/compile-fail/not-panic-safe.rs +++ b/src/test/compile-fail/not-panic-safe.rs @@ -16,5 +16,5 @@ use std::panic::RecoverSafe; fn assert() {} fn main() { - assert::<&mut i32>(); //~ ERROR: RecoverSafe` is not implemented + assert::<&mut i32>(); //~ ERROR: RecoverSafe` is not satisfied } diff --git a/src/test/compile-fail/not-sync.rs b/src/test/compile-fail/not-sync.rs index c9648a18be5..3955e3a040c 100644 --- a/src/test/compile-fail/not-sync.rs +++ b/src/test/compile-fail/not-sync.rs @@ -16,19 +16,19 @@ fn test() {} fn main() { test::>(); - //~^ ERROR marker::Sync` is not implemented for the type `std::cell::Cell` + //~^ ERROR `std::cell::Cell : std::marker::Sync` is not satisfied test::>(); - //~^ ERROR marker::Sync` is not implemented for the type `std::cell::RefCell` + //~^ ERROR `std::cell::RefCell : std::marker::Sync` is not satisfied test::>(); - //~^ ERROR marker::Sync` is not implemented for the type `std::rc::Rc` + //~^ ERROR `std::rc::Rc : std::marker::Sync` is not satisfied test::>(); - //~^ ERROR marker::Sync` is not implemented for the type `std::rc::Weak` + //~^ ERROR `std::rc::Weak : std::marker::Sync` is not satisfied test::>(); - //~^ ERROR marker::Sync` is not implemented for the type `std::sync::mpsc::Receiver` + //~^ ERROR `std::sync::mpsc::Receiver : std::marker::Sync` is not satisfied test::>(); - //~^ ERROR marker::Sync` is not implemented for the type `std::sync::mpsc::Sender` + //~^ ERROR `std::sync::mpsc::Sender : std::marker::Sync` is not satisfied test::>(); - //~^ ERROR marker::Sync` is not implemented for the type `std::sync::mpsc::SyncSender` + //~^ ERROR `std::sync::mpsc::SyncSender : 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 efbf3782f97..6673a87e9e4 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: F) {} fn take_object(f: Box) { take_foo(f); } -//~^ ERROR the trait `Foo` is not implemented +//~^ ERROR `Box : 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 92def18f824..0006b29979c 100644 --- a/src/test/compile-fail/phantom-oibit.rs +++ b/src/test/compile-fail/phantom-oibit.rs @@ -31,11 +31,11 @@ struct Nested(T); fn is_zen(_: T) {} fn not_sync(x: Guard) { - is_zen(x) //~ error: the trait `std::marker::Sync` is not implemented for the type `T` + is_zen(x) //~ error: `T : std::marker::Sync` is not satisfied } fn nested_not_sync(x: Nested>) { - is_zen(x) //~ error: the trait `std::marker::Sync` is not implemented for the type `T` + 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 46d7666dabc..25b7465a164 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 the trait `std::marker::Sized` is not implemented - //~| ERROR the trait `std::marker::Sized` is not implemented + //~^ ERROR `[_] : std::marker::Sized` is not satisfied + //~| ERROR `[_] : std::marker::Sized` is not satisfied } diff --git a/src/test/compile-fail/reflect-assoc.rs b/src/test/compile-fail/reflect-assoc.rs index 9cf0d252c2d..7cac3f41d54 100644 --- a/src/test/compile-fail/reflect-assoc.rs +++ b/src/test/compile-fail/reflect-assoc.rs @@ -24,7 +24,7 @@ struct Struct(T); fn is_reflect() { } fn a() { - is_reflect::>>(); //~ ERROR not implemented + is_reflect::>>(); //~ ERROR E0277 } fn ok_a() { diff --git a/src/test/compile-fail/reflect-object-param.rs b/src/test/compile-fail/reflect-object-param.rs index 9f074667feb..476b498ae64 100644 --- a/src/test/compile-fail/reflect-object-param.rs +++ b/src/test/compile-fail/reflect-object-param.rs @@ -23,7 +23,7 @@ struct Struct(T); fn is_reflect() { } fn a() { - is_reflect::(); //~ ERROR not implemented + is_reflect::(); //~ ERROR E0277 } fn ok_a() { @@ -31,7 +31,7 @@ fn ok_a() { } fn b() { - is_reflect::>>(); //~ ERROR not implemented + is_reflect::>>(); //~ ERROR E0277 } fn ok_b() { @@ -39,7 +39,7 @@ fn ok_b() { } fn c() { - is_reflect::>>>(); //~ ERROR not implemented + is_reflect::>>>(); //~ ERROR E0277 } fn main() { diff --git a/src/test/compile-fail/reflect.rs b/src/test/compile-fail/reflect.rs index 701aa5b40bc..fdd569e2c1b 100644 --- a/src/test/compile-fail/reflect.rs +++ b/src/test/compile-fail/reflect.rs @@ -22,7 +22,7 @@ struct Struct(T); fn is_reflect() { } fn c() { - is_reflect::>(); //~ ERROR not implemented + is_reflect::>(); //~ ERROR E0277 } fn ok_c() { @@ -30,7 +30,7 @@ fn ok_c() { } fn d() { - is_reflect::<(i32, T)>(); //~ ERROR not implemented + is_reflect::<(i32, T)>(); //~ ERROR E0277 } fn main() { 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 0a55fe9f942..3553d0dab31 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 the trait `std::marker::Copy` is not implemented for the type `Foo` + //~^ 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 6af731caaba..61fa3cbfe69 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 the trait `std::ops::Index<_>` is not implemented + 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 1fbdb3fddce..f372a17e045 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 { loop {} } fn mutate(s: &mut str) { s[1..2] = bot(); - //~^ ERROR `std::marker::Sized` is not implemented for the type `str` - //~| ERROR `std::marker::Sized` is not implemented for the type `str` + //~^ ERROR `str : std::marker::Sized` is not satisfied + //~| ERROR `str : std::marker::Sized` is not satisfied s[1usize] = bot(); - //~^ ERROR `std::ops::Index` is not implemented for the type `str` - //~| ERROR `std::ops::IndexMut` is not implemented for the type `str` + //~^ ERROR `str : std::ops::Index` is not satisfied + //~| ERROR `str : std::ops::IndexMut` is not satisfied } pub fn main() {} diff --git a/src/test/compile-fail/task-rng-isnt-sendable.rs b/src/test/compile-fail/task-rng-isnt-sendable.rs index 6d1a3ee7940..a11df776e06 100644 --- a/src/test/compile-fail/task-rng-isnt-sendable.rs +++ b/src/test/compile-fail/task-rng-isnt-sendable.rs @@ -16,5 +16,5 @@ fn test_send() {} pub fn main() { test_send::(); - //~^ ERROR `std::marker::Send` is not implemented + //~^ ERROR : std::marker::Send` is not satisfied } 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 f70b2a90474..0a771ecf63f 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 the trait `std::marker::Sized` is not implemented + //~^ 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-in-fns.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-in-fns.rs index dbfda61f552..6a271a7b749 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-in-fns.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-in-fns.rs @@ -21,10 +21,10 @@ enum Bar { } fn explode(x: Foo) {} -//~^ ERROR not implemented +//~^ ERROR E0277 fn kaboom(y: Bar) {} -//~^ ERROR not implemented +//~^ ERROR E0277 fn main() { } diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-in-impls.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-in-impls.rs index c647dd38ee3..77abe6f7f74 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-in-impls.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-in-impls.rs @@ -28,7 +28,7 @@ trait PolyTrait struct Struct; impl PolyTrait> for Struct { -//~^ ERROR not implemented +//~^ ERROR E0277 } fn main() { diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs index 520691fbecc..9e680d17fb9 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs @@ -18,10 +18,10 @@ struct Foo { fn main() { let foo = Foo { - //~^ ERROR not implemented + //~^ ERROR E0277 x: 3 }; let baz: Foo = loop { }; - //~^ ERROR not implemented + //~^ ERROR E0277 } diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-static.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-static.rs index d93c9bafaef..2b59fdcae35 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-static.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-static.rs @@ -17,7 +17,7 @@ struct Foo { } static X: Foo = Foo { -//~^ ERROR not implemented +//~^ ERROR E0277 x: 1, }; diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc.rs index 5f95a7ca6e2..975de00d02a 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc.rs @@ -15,10 +15,10 @@ extern crate trait_bounds_on_structs_and_enums_xc; use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait}; fn explode(x: Foo) {} -//~^ ERROR not implemented +//~^ ERROR E0277 fn kaboom(y: Bar) {} -//~^ ERROR not implemented +//~^ ERROR E0277 fn main() { } diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs index 840787022e6..515684bcf42 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs @@ -16,10 +16,10 @@ use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait}; fn main() { let foo = Foo { - //~^ ERROR not implemented + //~^ ERROR E0277 x: 3 }; let bar: Bar = return; - //~^ ERROR not implemented + //~^ ERROR E0277 let _ = bar; } 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 e1b005b0c85..8dd38544d3c 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,32 +21,32 @@ enum Bar { } impl Foo { -//~^ ERROR the trait `Trait` is not implemented +//~^ ERROR `T : Trait` is not satisfied fn uhoh() {} } struct Baz { - a: Foo, //~ ERROR not implemented + a: Foo, //~ ERROR E0277 } enum Boo { - Quux(Bar), //~ ERROR not implemented + Quux(Bar), //~ ERROR E0277 } struct Badness { - b: Foo, //~ ERROR not implemented + b: Foo, //~ ERROR E0277 } enum MoreBadness { - EvenMoreBadness(Bar), //~ ERROR not implemented + EvenMoreBadness(Bar), //~ ERROR E0277 } struct TupleLike( - Foo, //~ ERROR not implemented + Foo, //~ ERROR E0277 ); enum Enum { - DictionaryLike { field: Bar }, //~ ERROR not implemented + DictionaryLike { field: Bar }, //~ ERROR E0277 } fn main() { diff --git a/src/test/compile-fail/trait-coercion-generic-bad.rs b/src/test/compile-fail/trait-coercion-generic-bad.rs index b25af522b24..85c26368f9f 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> = Box::new(Struct { person: "Fred" }); - //~^ ERROR the trait `Trait` is not implemented for the type `Struct` + //~^ ERROR `Struct : Trait` 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 new file mode 100644 index 00000000000..8827cccd0f3 --- /dev/null +++ b/src/test/compile-fail/trait-suggest-where-clause.rs @@ -0,0 +1,67 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::mem; + +struct Misc(T); + +fn check() { + // suggest a where-clause, if needed + mem::size_of::(); + //~^ ERROR `U : std::marker::Sized` is not satisfied + //~| HELP E0277 + //~| HELP consider adding a `where U : std::marker::Sized` bound + //~| NOTE required by `std::mem::size_of` + + mem::size_of::>(); + //~^ ERROR `U : std::marker::Sized` is not satisfied + //~| HELP E0277 + //~| HELP consider adding a `where U : std::marker::Sized` bound + //~| NOTE required because it appears within the type `Misc` + //~| NOTE required by `std::mem::size_of` + + // ... even if T occurs as a type parameter + + >::from; + //~^ ERROR `u64 : std::convert::From` is not satisfied + //~| HELP E0277 + //~| HELP consider adding a `where u64 : std::convert::From` bound + //~| NOTE required by `std::convert::From::from` + + ::Item>>::from; + //~^ ERROR `u64 : std::convert::From<::Item>` is not satisfied + //~| HELP E0277 + //~| HELP consider adding a `where u64 : + //~| NOTE required by `std::convert::From::from` + + // ... but not if there are inference variables + + as From>::from; + //~^ ERROR `Misc<_> : std::convert::From` 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 + //~| 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 + //~| HELP E0277 + //~| NOTE `[&U]` does not have a constant size + //~| NOTE required by `std::mem::size_of` +} + +fn main() { +} diff --git a/src/test/compile-fail/traits-negative-impls.rs b/src/test/compile-fail/traits-negative-impls.rs index 0eb4e230e14..4a266dd07e6 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 the trait `std::marker::Send` is not implemented for the type `dummy::TestType` - //~| ERROR the trait `std::marker::Send` is not implemented for the type `dummy::TestType` + //~^ 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 the trait `std::marker::Send` is not implemented for the type `dummy1b::TestType` + //~^ 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 the trait `std::marker::Send` is not implemented for the type `dummy1c::TestType` + //~^ 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 the trait `std::marker::Send` is not implemented for the type `dummy2::TestType` + //~^ 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 the trait `std::marker::Send` is not implemented for the type `dummy3::TestType` + //~^ 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 the trait `std::marker::Send` is not implemented for the type `main::TestType` + //~^ 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 d61ac6f08d9..244f75a3592 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 for i64 { impl CompareToInts for i64 { } fn with_obj(c: &CompareToInts) -> bool { - c.same_as(22) //~ ERROR `CompareTo` is not implemented + c.same_as(22) //~ ERROR `CompareToInts : CompareTo` is not satisfied } fn with_trait(c: &C) -> bool { - c.same_as(22) //~ ERROR `CompareTo` is not implemented + c.same_as(22) //~ ERROR `C : CompareTo` is not satisfied } fn with_ufcs1(c: &C) -> bool { - CompareToInts::same_as(c, 22) //~ ERROR `CompareTo` is not implemented + CompareToInts::same_as(c, 22) //~ ERROR `CompareToInts : CompareTo` is not satisfied } fn with_ufcs2(c: &C) -> bool { - CompareTo::same_as(c, 22) //~ ERROR `CompareTo` is not implemented + CompareTo::same_as(c, 22) //~ ERROR `C : CompareTo` is not satisfied } fn main() { - assert_eq!(22_i64.same_as(22), true); //~ ERROR `CompareTo` is not implemented + assert_eq!(22_i64.same_as(22), true); //~ ERROR `i64 : CompareTo` is not satisfied } diff --git a/src/test/compile-fail/type-params-in-different-spaces-2.rs b/src/test/compile-fail/type-params-in-different-spaces-2.rs index 71e9113603a..d07282763d8 100644 --- a/src/test/compile-fail/type-params-in-different-spaces-2.rs +++ b/src/test/compile-fail/type-params-in-different-spaces-2.rs @@ -17,13 +17,13 @@ trait Tr : Sized { trait A: Tr { fn test(u: U) -> Self { - Tr::op(u) //~ ERROR not implemented + Tr::op(u) //~ ERROR E0277 } } trait B: Tr { fn test(u: U) -> Self { - Tr::op(u) //~ ERROR not implemented + Tr::op(u) //~ ERROR E0277 } } diff --git a/src/test/compile-fail/typeck-default-trait-impl-assoc-type.rs b/src/test/compile-fail/typeck-default-trait-impl-assoc-type.rs index 8a9d53731c5..f8342c333a3 100644 --- a/src/test/compile-fail/typeck-default-trait-impl-assoc-type.rs +++ b/src/test/compile-fail/typeck-default-trait-impl-assoc-type.rs @@ -16,7 +16,7 @@ trait Trait { fn dummy(&self) { } } fn bar() { - is_send::(); //~ ERROR not implemented + is_send::(); //~ ERROR E0277 } fn is_send() { 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 a27f7f7ebbe..93800d3907a 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::(); is_mytrait::<(MyS2, MyS)>(); - //~^ ERROR the trait `MyTrait` is not implemented for the type `MyS2` + //~^ 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 24819bb4f08..a49047524e6 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::(); is_mytrait::(); - //~^ ERROR the trait `MyTrait` is not implemented for the type `MyS2` + //~^ 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 58519e4df75..0158cbcfcda 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() {} fn main() { is_send::(); is_send::(); - //~^ ERROR the trait `std::marker::Send` is not implemented for the type `MyNotSendable` + //~^ 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 8d174271a36..6cfc9bc5f5e 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() {} fn main() { is_sync::(); is_sync::(); - //~^ ERROR the trait `std::marker::Sync` is not implemented for the type `MyNotSync` + //~^ ERROR `MyNotSync : std::marker::Sync` is not satisfied is_sync::(); - //~^ ERROR the trait `std::marker::Sync` is not implemented for the type `std::cell::UnsafeCell` + //~^ ERROR `std::cell::UnsafeCell : std::marker::Sync` is not satisfied is_sync::(); - //~^ ERROR the trait `std::marker::Sync` is not implemented for the type `Managed` + //~^ 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 4b91d0b7a73..98e617ee665 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() {} fn main() { is_my_trait::(); is_my_trait::(); - //~^ ERROR the trait `MyTrait` is not implemented for the type `ThisImplsUnsafeTrait` + //~^ ERROR `ThisImplsUnsafeTrait : MyTrait` is not satisfied is_my_unsafe_trait::(); - //~^ ERROR the trait `MyUnsafeTrait` is not implemented for the type `ThisImplsTrait` + //~^ ERROR `ThisImplsTrait : MyUnsafeTrait` is not satisfied is_my_unsafe_trait::(); } 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 c67fc92313c..109b2ed24ea 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 the trait `Signed` is not implemented for the type `u32` + //~^ ERROR `u32 : Signed` is not satisfied } diff --git a/src/test/compile-fail/typeck-default-trait-impl-send-param.rs b/src/test/compile-fail/typeck-default-trait-impl-send-param.rs index 185e9dcb3bd..0c548b3bd99 100644 --- a/src/test/compile-fail/typeck-default-trait-impl-send-param.rs +++ b/src/test/compile-fail/typeck-default-trait-impl-send-param.rs @@ -12,7 +12,7 @@ // an explicit trait bound. fn foo() { - is_send::() //~ ERROR not implemented + is_send::() //~ ERROR E0277 } fn is_send() { 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 c9bfdff6c0e..81c4a3c5a51 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() { bar::() } fn bar() { } fn main() { - foo::(); //~ ERROR the trait `NotImplemented` is not implemented for the type `i32` - bar::(); //~ ERROR the trait `NotImplemented` is not implemented for the type `i64` + foo::(); //~ ERROR `i32 : NotImplemented` is not satisfied + bar::(); //~ 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 c624ba425e4..29379d54961 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() { } fn test() { bar::>(); - //~^ ERROR the trait `NotImplemented` is not implemented for the type `std::option::Option` + //~^ ERROR `std::option::Option : 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 c1757d124da..a3a80e17e40 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() { - //~^ ERROR the trait `NotImplemented` is not implemented for the type `std::option::Option` + //~^ ERROR `std::option::Option : 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 a0d236a1c51..f34bae3be3c 100644 --- a/src/test/compile-fail/typeck-unsafe-always-share.rs +++ b/src/test/compile-fail/typeck-unsafe-always-share.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Verify that UnsafeCell is *always* sync regardless if `T` is sync. +// Verify that UnsafeCell is *always* !Sync regardless if `T` is sync. #![feature(optin_builtin_traits)] @@ -27,16 +27,16 @@ fn test(s: T) {} fn main() { let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0)}); test(us); - //~^ ERROR `std::marker::Sync` is not implemented + //~^ ERROR `std::cell::UnsafeCell> : std::marker::Sync` is not satisfied let uns = UnsafeCell::new(NoSync); test(uns); - //~^ ERROR `std::marker::Sync` is not implemented + //~^ ERROR `std::cell::UnsafeCell : std::marker::Sync` is not satisfied let ms = MySync{u: uns}; test(ms); - //~^ ERROR `std::marker::Sync` is not implemented + //~^ ERROR `std::cell::UnsafeCell : std::marker::Sync` is not satisfied test(NoSync); - //~^ ERROR `std::marker::Sync` is not implemented + //~^ 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 c07374ceaf2..792c4a8ca3c 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() { >::add(1, 2); - //~^ ERROR the trait `std::ops::Add` is not implemented for the type `i32` + //~^ ERROR `i32 : std::ops::Add` is not satisfied >::add(1u32, 2); //~^ ERROR mismatched types >::add(1, 2u32); diff --git a/src/test/compile-fail/unboxed-closure-sugar-default.rs b/src/test/compile-fail/unboxed-closure-sugar-default.rs index 831db98941c..849f7e0573c 100644 --- a/src/test/compile-fail/unboxed-closure-sugar-default.rs +++ b/src/test/compile-fail/unboxed-closure-sugar-default.rs @@ -29,7 +29,7 @@ fn test<'a,'b>() { // In angle version, we supply something other than the default eq::< Foo<(isize,),isize,Output=()>, Foo(isize) >(); - //~^ ERROR not implemented + //~^ ERROR E0277 // Supply default explicitly. eq::< Foo<(isize,),(isize,),Output=()>, Foo(isize) >(); diff --git a/src/test/compile-fail/unboxed-closure-sugar-equiv.rs b/src/test/compile-fail/unboxed-closure-sugar-equiv.rs index dc5576aee65..0cf44a2ca61 100644 --- a/src/test/compile-fail/unboxed-closure-sugar-equiv.rs +++ b/src/test/compile-fail/unboxed-closure-sugar-equiv.rs @@ -52,7 +52,7 @@ fn test<'a,'b>() { // Errors expected: eq::< Foo<(),Output=()>, Foo(char) >(); - //~^^ ERROR not implemented + //~^^ ERROR E0277 } fn main() { } diff --git a/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs b/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs index 93498ac7f83..b25b3318806 100644 --- a/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs +++ b/src/test/compile-fail/unboxed-closures-fnmut-as-fn.rs @@ -36,5 +36,5 @@ fn call_itisize>(f: &F, x: isize) -> isize { fn main() { let x = call_it(&S, 22); - //~^ ERROR not implemented + //~^ ERROR E0277 } diff --git a/src/test/compile-fail/unboxed-closures-unsafe-extern-fn.rs b/src/test/compile-fail/unboxed-closures-unsafe-extern-fn.rs index 361df93a716..cba7ad82ee1 100644 --- a/src/test/compile-fail/unboxed-closures-unsafe-extern-fn.rs +++ b/src/test/compile-fail/unboxed-closures-unsafe-extern-fn.rs @@ -22,19 +22,19 @@ fn call_it_onceisize>(_: F, _: isize) -> isize { 0 } fn a() { let x = call_it(&square, 22); - //~^ ERROR not implemented - //~| ERROR not implemented + //~^ ERROR E0277 + //~| ERROR E0277 } fn b() { let y = call_it_mut(&mut square, 22); - //~^ ERROR not implemented - //~| ERROR not implemented + //~^ ERROR E0277 + //~| ERROR E0277 } fn c() { let z = call_it_once(square, 22); - //~^ ERROR not implemented + //~^ ERROR E0277 } fn main() { } diff --git a/src/test/compile-fail/unboxed-closures-wrong-abi.rs b/src/test/compile-fail/unboxed-closures-wrong-abi.rs index ca15d1bb5ee..dd891bc473c 100644 --- a/src/test/compile-fail/unboxed-closures-wrong-abi.rs +++ b/src/test/compile-fail/unboxed-closures-wrong-abi.rs @@ -22,19 +22,19 @@ fn call_it_onceisize>(_: F, _: isize) -> isize { 0 } fn a() { let x = call_it(&square, 22); - //~^ ERROR not implemented - //~| ERROR not implemented + //~^ ERROR E0277 + //~| ERROR E0277 } fn b() { let y = call_it_mut(&mut square, 22); - //~^ ERROR not implemented - //~| ERROR not implemented + //~^ ERROR E0277 + //~| ERROR E0277 } fn c() { let z = call_it_once(square, 22); - //~^ ERROR not implemented + //~^ ERROR E0277 } fn main() { } diff --git a/src/test/compile-fail/unboxed-closures-wrong-arg-type-extern-fn.rs b/src/test/compile-fail/unboxed-closures-wrong-arg-type-extern-fn.rs index b960362aad7..f9edd5df673 100644 --- a/src/test/compile-fail/unboxed-closures-wrong-arg-type-extern-fn.rs +++ b/src/test/compile-fail/unboxed-closures-wrong-arg-type-extern-fn.rs @@ -23,19 +23,19 @@ fn call_it_onceisize>(_: F, _: isize) -> isize { 0 } fn a() { let x = call_it(&square, 22); - //~^ ERROR not implemented - //~| ERROR not implemented + //~^ ERROR E0277 + //~| ERROR E0277 } fn b() { let y = call_it_mut(&mut square, 22); - //~^ ERROR not implemented - //~| ERROR not implemented + //~^ ERROR E0277 + //~| ERROR E0277 } fn c() { let z = call_it_once(square, 22); - //~^ ERROR not implemented + //~^ ERROR E0277 } fn main() { } diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index 82aa49aa706..c0a27e98faf 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -17,5 +17,5 @@ fn main() { // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. let i = Box::new(Rc::new(100)); f(i); - //~^ ERROR `std::marker::Send` is not implemented + //~^ ERROR `std::rc::Rc<_> : std::marker::Send` is not satisfied } diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index ed606dae55f..ae767464060 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -35,8 +35,8 @@ fn main() { let r1 = vec!(Box::new(r { i: i1 })); let r2 = vec!(Box::new(r { i: i2 })); f(clone(&r1), clone(&r2)); - //~^ ERROR the trait `std::clone::Clone` is not implemented for the type - //~^^ ERROR the trait `std::clone::Clone` is not implemented for the type + //~^ ERROR `r<'_> : std::clone::Clone` is not satisfied + //~^^ ERROR `r<'_> : std::clone::Clone` is not satisfied println!("{:?}", (r2, i1.get())); println!("{:?}", (r1, i2.get())); } diff --git a/src/test/compile-fail/unsized-bare-typaram.rs b/src/test/compile-fail/unsized-bare-typaram.rs index 1885049f169..49642ac1490 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() { } -fn foo() { bar::() } //~ ERROR the trait `std::marker::Sized` is not implemented +fn foo() { bar::() } //~ 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 dad492eb243..bd5b705511d 100644 --- a/src/test/compile-fail/unsized-enum.rs +++ b/src/test/compile-fail/unsized-enum.rs @@ -15,14 +15,14 @@ fn not_sized() { } enum Foo { FooSome(U), FooNone } fn foo1() { not_sized::>() } // Hunky dory. fn foo2() { not_sized::>() } -//~^ ERROR the trait `std::marker::Sized` is not implemented +//~^ ERROR `T : std::marker::Sized` is not satisfied // // Not OK: `T` is not sized. enum Bar { BarSome(U), BarNone } fn bar1() { not_sized::>() } fn bar2() { is_sized::>() } -//~^ ERROR the trait `std::marker::Sized` is not implemented +//~^ ERROR `T : std::marker::Sized` is not satisfied // // Not OK: `Bar` is not sized, but it should be. diff --git a/src/test/compile-fail/unsized-inherent-impl-self-type.rs b/src/test/compile-fail/unsized-inherent-impl-self-type.rs index a03c76b12dd..4d0774f2ce4 100644 --- a/src/test/compile-fail/unsized-inherent-impl-self-type.rs +++ b/src/test/compile-fail/unsized-inherent-impl-self-type.rs @@ -14,7 +14,7 @@ struct S5(Y); -impl S5 { //~ ERROR not implemented +impl S5 { //~ ERROR E0277 } fn main() { } diff --git a/src/test/compile-fail/unsized-struct.rs b/src/test/compile-fail/unsized-struct.rs index c317850be1a..94f15033cb7 100644 --- a/src/test/compile-fail/unsized-struct.rs +++ b/src/test/compile-fail/unsized-struct.rs @@ -15,14 +15,14 @@ fn not_sized() { } struct Foo { data: T } fn foo1() { not_sized::>() } // Hunky dory. fn foo2() { not_sized::>() } -//~^ ERROR the trait `std::marker::Sized` is not implemented +//~^ ERROR `T : std::marker::Sized` is not satisfied // // Not OK: `T` is not sized. struct Bar { data: T } fn bar1() { not_sized::>() } fn bar2() { is_sized::>() } -//~^ ERROR the trait `std::marker::Sized` is not implemented +//~^ ERROR `T : std::marker::Sized` is not satisfied // // Not OK: `Bar` is not sized, but it should be. diff --git a/src/test/compile-fail/unsized-trait-impl-self-type.rs b/src/test/compile-fail/unsized-trait-impl-self-type.rs index 08df1d9b7b8..c919bdf924f 100644 --- a/src/test/compile-fail/unsized-trait-impl-self-type.rs +++ b/src/test/compile-fail/unsized-trait-impl-self-type.rs @@ -17,7 +17,7 @@ trait T3 { struct S5(Y); -impl T3 for S5 { //~ ERROR not implemented +impl T3 for S5 { //~ ERROR E0277 } fn main() { } 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 9cae2b56799..bd420d940d5 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 { } struct S4(Box); impl T2 for S4 { - //~^ ERROR `std::marker::Sized` is not implemented for the type `X` + //~^ 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 acce00bd87e..061f0695df7 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: &X) { f2::(x); - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ ERROR `X : std::marker::Sized` is not satisfied } fn f2(x: &X) { } @@ -26,7 +26,7 @@ trait T { } fn f3(x: &X) { f4::(x); - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ ERROR `X : std::marker::Sized` is not satisfied } fn f4(x: &X) { } @@ -40,7 +40,7 @@ fn f5(x: &Y) {} fn f6(x: &X) {} fn f7(x1: &E, x2: &E) { f5(x1); - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ ERROR `X : std::marker::Sized` is not satisfied f6(x2); // ok } @@ -52,19 +52,19 @@ struct S { fn f8(x1: &S, x2: &S) { f5(x1); - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ ERROR `X : std::marker::Sized` is not satisfied f6(x2); // ok } // Test some tuples. fn f9(x1: Box>, x2: Box>) { f5(&(*x1, 34)); - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ ERROR `X : std::marker::Sized` is not satisfied } fn f10(x1: Box>, x2: Box>) { f5(&(32, *x2)); - //~^ ERROR the trait `std::marker::Sized` is not implemented + //~^ 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 463ce2515ff..1abc45d5df8 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 { - f1: X, //~ ERROR `std::marker::Sized` is not implemented + f1: X, //~ ERROR `X : std::marker::Sized` is not satisfied f2: isize, } struct S2 { f: isize, - g: X, //~ ERROR `std::marker::Sized` is not implemented + g: X, //~ ERROR `X : std::marker::Sized` is not satisfied h: isize, } struct S3 { - f: str, //~ ERROR `std::marker::Sized` is not implemented + f: str, //~ ERROR `str : std::marker::Sized` is not satisfied g: [usize] } struct S4 { - f: [u8], //~ ERROR `std::marker::Sized` is not implemented + f: [u8], //~ ERROR `[u8] : std::marker::Sized` is not satisfied g: usize } enum E { - V1(X, isize), //~ERROR `std::marker::Sized` is not implemented + V1(X, isize), //~ERROR `X : std::marker::Sized` is not satisfied } enum F { - V2{f1: X, f: isize}, //~ERROR `std::marker::Sized` is not implemented + 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 4b55cdf25e5..7545794bd23 100644 --- a/src/test/compile-fail/unsized6.rs +++ b/src/test/compile-fail/unsized6.rs @@ -15,27 +15,27 @@ trait T {} fn f1(x: &X) { let _: X; // <-- this is OK, no bindings created, no initializer. let _: (isize, (X, isize)); // same - let y: X; //~ERROR the trait `std::marker::Sized` is not implemented - let y: (isize, (X, isize)); //~ERROR the trait `std::marker::Sized` is not implemented + 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: &X) { - let y: X; //~ERROR the trait `std::marker::Sized` is not implemented - let y: (isize, (X, isize)); //~ERROR the trait `std::marker::Sized` is not implemented + 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(x1: Box, x2: Box, x3: Box) { - let y: X = *x1; //~ERROR the trait `std::marker::Sized` is not implemented - let y = *x2; //~ERROR the trait `std::marker::Sized` is not implemented - let (y, z) = (*x3, 4); //~ERROR the trait `std::marker::Sized` is not implemented + 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(x1: Box, x2: Box, x3: Box) { - let y: X = *x1; //~ERROR the trait `std::marker::Sized` is not implemented - let y = *x2; //~ERROR the trait `std::marker::Sized` is not implemented - let (y, z) = (*x3, 4); //~ERROR the trait `std::marker::Sized` is not implemented + 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: X) {} //~ERROR the trait `std::marker::Sized` is not implemented -fn g2(x: X) {} //~ERROR the trait `std::marker::Sized` is not implemented +fn g1(x: X) {} //~ERROR `X : std::marker::Sized` is not satisfied +fn g2(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 defa57414f4..5aa1f133679 100644 --- a/src/test/compile-fail/unsized7.rs +++ b/src/test/compile-fail/unsized7.rs @@ -20,7 +20,7 @@ trait T1 { struct S3(Box); impl T1 for S3 { - //~^ ERROR `std::marker::Sized` is not implemented for the type `X` + //~^ 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 654272f5bc6..e32cb32a74d 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: B) -> isize { let y = 4; - b.gimme_an_a(y) //~ ERROR the trait `TraitA` is not implemented + 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 ba31de98e7f..b797c9780ac 100644 --- a/src/test/compile-fail/wf-impl-associated-type-trait.rs +++ b/src/test/compile-fail/wf-impl-associated-type-trait.rs @@ -25,9 +25,8 @@ pub trait Foo { impl Foo for T { type Bar = MySet; - //~^ ERROR the trait `MyHash` is not implemented for the type `T` + //~^ ERROR the predicate `T : MyHash` is not satisfied } #[rustc_error] fn main() { } - 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 354407bc002..42e9fa2614c 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 Foo { fn fails_copy(self) { require_copy(self.x); - //~^ ERROR the trait `std::marker::Copy` is not implemented for the type `T` + //~^ ERROR the predicate `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 b747a555b5e..889cf85221b 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 Foo for Bar { fn fails_copy(self) { require_copy(self.x); - //~^ ERROR the trait `std::marker::Copy` is not implemented for the type `T` + //~^ ERROR the predicate `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 bf614e6eb51..0f682582c3e 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 for isize { fn main() { 1.method::(); - //~^ ERROR the trait `Foo` is not implemented for the type `X` + //~^ ERROR the predicate `X : Foo` 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 c4d7d8207e7..34ff872ac15 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 Foo { fn main() { let x = Foo { value: Bar }; x.equals(&x); - //~^ ERROR the trait `std::cmp::Eq` is not implemented for the type `Bar` + //~^ 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 d1d0eb13d68..0410d7c0583 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 `std::cmp::Eq` is not implemented + //~^ ERROR the predicate `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 cd5240198b3..1baaed3dd37 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(x: &T) fn main() { foo(&X); - //~^ error: `for<'a> Bar` is not implemented + //~^ error: `for<'a> &'a _ : Bar` is not satisfied }