From ce936e9336afbd1ff116c64f0fdcc438b4745c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sat, 11 Apr 2020 14:14:16 -0700 Subject: [PATCH] Do not emit note for projected derived obligations --- src/librustc_middle/traits/mod.rs | 7 ++++++- src/librustc_middle/traits/structural_impls.rs | 1 + .../traits/error_reporting/on_unimplemented.rs | 3 ++- .../traits/error_reporting/suggestions.rs | 13 ++++++++++++- src/librustc_trait_selection/traits/wf.rs | 2 +- .../bad-bounds-on-assoc-in-trait.stderr | 1 - .../defaults-unsound-62211-1.stderr | 4 ---- .../defaults-unsound-62211-2.stderr | 4 ---- src/test/ui/associated-types/issue-43924.stderr | 4 ---- src/test/ui/associated-types/issue-65774-1.stderr | 2 -- src/test/ui/associated-types/issue-65774-2.stderr | 2 -- .../point-at-type-on-obligation-failure-2.stderr | 6 ------ .../builtin-superkinds-double-superkind.stderr | 2 -- .../builtin-superkinds-in-metadata.stderr | 1 - .../builtin-superkinds-simple.stderr | 1 - .../builtin-superkinds-typaram-not-send.stderr | 1 - src/test/ui/dst/dst-sized-trait-param.stderr | 2 -- ...lt-type-param-can-reference-self-in-trait.stderr | 1 - src/test/ui/impl-bounds-checking.stderr | 2 -- src/test/ui/issues/issue-10412.stderr | 1 - .../ui/issues/issue-43784-associated-type.stderr | 1 - src/test/ui/issues/issue-43784-supertrait.stderr | 1 - src/test/ui/issues/issue-65673.stderr | 1 - src/test/ui/malformed/malformed-derive-entry.stderr | 2 -- .../defaultimpl/specialization-wfcheck.stderr | 1 - .../missing-assoc-type-bound-restriction.stderr | 1 - src/test/ui/traits/cycle-cache-err-60010.stderr | 1 - .../ui/unsized/unsized-trait-impl-trait-arg.stderr | 1 - src/test/ui/unsized7.stderr | 1 - 29 files changed, 22 insertions(+), 48 deletions(-) diff --git a/src/librustc_middle/traits/mod.rs b/src/librustc_middle/traits/mod.rs index 47c8aa023f043..d22a4ac298efe 100644 --- a/src/librustc_middle/traits/mod.rs +++ b/src/librustc_middle/traits/mod.rs @@ -191,6 +191,8 @@ pub enum ObligationCauseCode<'tcx> { ImplDerivedObligation(DerivedObligationCause<'tcx>), + DerivedObligation(DerivedObligationCause<'tcx>), + /// Error derived when matching traits/impls; see ObligationCause for more details CompareImplMethodObligation { item_name: ast::Name, @@ -263,7 +265,10 @@ impl ObligationCauseCode<'_> { // Return the base obligation, ignoring derived obligations. pub fn peel_derives(&self) -> &Self { let mut base_cause = self; - while let BuiltinDerivedObligation(cause) | ImplDerivedObligation(cause) = base_cause { + while let BuiltinDerivedObligation(cause) + | ImplDerivedObligation(cause) + | DerivedObligation(cause) = base_cause + { base_cause = &cause.parent_code; } base_cause diff --git a/src/librustc_middle/traits/structural_impls.rs b/src/librustc_middle/traits/structural_impls.rs index b7d0f6666bd38..5831cb3859f81 100644 --- a/src/librustc_middle/traits/structural_impls.rs +++ b/src/librustc_middle/traits/structural_impls.rs @@ -456,6 +456,7 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> { super::ImplDerivedObligation(ref cause) => { tcx.lift(cause).map(super::ImplDerivedObligation) } + super::DerivedObligation(ref cause) => tcx.lift(cause).map(super::DerivedObligation), super::CompareImplMethodObligation { item_name, impl_item_def_id, diff --git a/src/librustc_trait_selection/traits/error_reporting/on_unimplemented.rs b/src/librustc_trait_selection/traits/error_reporting/on_unimplemented.rs index 1ecc7fdafc442..e9f55c24256c7 100644 --- a/src/librustc_trait_selection/traits/error_reporting/on_unimplemented.rs +++ b/src/librustc_trait_selection/traits/error_reporting/on_unimplemented.rs @@ -134,7 +134,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { match obligation.cause.code { ObligationCauseCode::BuiltinDerivedObligation(..) - | ObligationCauseCode::ImplDerivedObligation(..) => {} + | ObligationCauseCode::ImplDerivedObligation(..) + | ObligationCauseCode::DerivedObligation(..) => {} _ => { // this is a "direct", user-specified, rather than derived, // obligation. diff --git a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs index 52bf2e6ad490c..9a6a6fefa7c71 100644 --- a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs +++ b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs @@ -1135,7 +1135,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { while let Some(code) = next_code { debug!("maybe_note_obligation_cause_for_async_await: code={:?}", code); match code { - ObligationCauseCode::BuiltinDerivedObligation(derived_obligation) + ObligationCauseCode::DerivedObligation(derived_obligation) + | ObligationCauseCode::BuiltinDerivedObligation(derived_obligation) | ObligationCauseCode::ImplDerivedObligation(derived_obligation) => { let ty = derived_obligation.parent_trait_ref.self_ty(); debug!( @@ -1661,6 +1662,16 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { obligated_types, ); } + ObligationCauseCode::DerivedObligation(ref data) => { + let parent_trait_ref = self.resolve_vars_if_possible(&data.parent_trait_ref); + let parent_predicate = parent_trait_ref.without_const().to_predicate(); + self.note_obligation_cause_code( + err, + &parent_predicate, + &data.parent_code, + obligated_types, + ); + } ObligationCauseCode::CompareImplMethodObligation { .. } => { err.note(&format!( "the requirement `{}` appears on the impl method \ diff --git a/src/librustc_trait_selection/traits/wf.rs b/src/librustc_trait_selection/traits/wf.rs index 0cda92b7dc8b4..f6953971ef5bc 100644 --- a/src/librustc_trait_selection/traits/wf.rs +++ b/src/librustc_trait_selection/traits/wf.rs @@ -243,7 +243,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> { parent_trait_ref, parent_code: Rc::new(obligation.cause.code.clone()), }; - cause.code = traits::ObligationCauseCode::ImplDerivedObligation(derived_cause); + cause.code = traits::ObligationCauseCode::DerivedObligation(derived_cause); } extend_cause_with_original_assoc_item_obligation( tcx, diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr index dd2f30e6dc040..96e690631894d 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr @@ -11,7 +11,6 @@ LL | impl Case1 for S1 { | ^^^^^ `>::App` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | = help: the trait `for<'a> std::fmt::Debug` is not implemented for `>::App` - = note: required because of the requirements on the impl of `for<'a> std::fmt::Debug` for `<<<::C as std::iter::Iterator>::Item as std::iter::Iterator>::Item as Lam<&'a u8>>::App` error[E0277]: `<::C as std::iter::Iterator>::Item` is not an iterator --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20 diff --git a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr index c4ab7b6e26e51..7bf75f3839c0e 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr @@ -53,7 +53,6 @@ LL | impl UncheckedCopy for T {} | = help: the trait `std::fmt::Display` is not implemented for `T` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: required because of the requirements on the impl of `std::fmt::Display` for `::Output` help: consider restricting type parameter `T` | LL | impl UncheckedCopy for T {} @@ -71,7 +70,6 @@ LL | + Deref LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::ops::Deref` for `::Output` help: consider restricting type parameter `T` | LL | impl UncheckedCopy for T {} @@ -90,7 +88,6 @@ LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ no implementation for `T += &'static str` | = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `T` - = note: required because of the requirements on the impl of `std::ops::AddAssign<&'static str>` for `::Output` help: consider restricting type parameter `T` | LL | impl> UncheckedCopy for T {} @@ -108,7 +105,6 @@ LL | type Output: Copy LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `::Output` help: consider restricting type parameter `T` | LL | impl UncheckedCopy for T {} diff --git a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr index c311a9f456e79..b6d889515b6fb 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr @@ -53,7 +53,6 @@ LL | impl UncheckedCopy for T {} | = help: the trait `std::fmt::Display` is not implemented for `T` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: required because of the requirements on the impl of `std::fmt::Display` for `::Output` help: consider restricting type parameter `T` | LL | impl UncheckedCopy for T {} @@ -71,7 +70,6 @@ LL | + Deref LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::ops::Deref` for `::Output` help: consider restricting type parameter `T` | LL | impl UncheckedCopy for T {} @@ -90,7 +88,6 @@ LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ no implementation for `T += &'static str` | = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `T` - = note: required because of the requirements on the impl of `std::ops::AddAssign<&'static str>` for `::Output` help: consider restricting type parameter `T` | LL | impl> UncheckedCopy for T {} @@ -108,7 +105,6 @@ LL | type Output: Copy LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `::Output` help: consider restricting type parameter `T` | LL | impl UncheckedCopy for T {} diff --git a/src/test/ui/associated-types/issue-43924.stderr b/src/test/ui/associated-types/issue-43924.stderr index 38dd8b66a6ed5..58f71b8b14ed2 100644 --- a/src/test/ui/associated-types/issue-43924.stderr +++ b/src/test/ui/associated-types/issue-43924.stderr @@ -16,8 +16,6 @@ LL | type Out: Default + ToString + ?Sized = dyn ToString; ... LL | impl Foo for () {} | ^^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)` - | - = note: required because of the requirements on the impl of `std::default::Default` for `<() as Foo>::Out` error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied --> $DIR/issue-43924.rs:11:6 @@ -29,8 +27,6 @@ LL | type Out: Default + ToString + ?Sized = dyn ToString; ... LL | impl Foo for () {} | ^^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)` - | - = note: required because of the requirements on the impl of `std::default::Default` for `<() as Foo>::Out` error: aborting due to 3 previous errors diff --git a/src/test/ui/associated-types/issue-65774-1.stderr b/src/test/ui/associated-types/issue-65774-1.stderr index ae3ebe811e2ab..2e5a1ebf19afa 100644 --- a/src/test/ui/associated-types/issue-65774-1.stderr +++ b/src/test/ui/associated-types/issue-65774-1.stderr @@ -16,8 +16,6 @@ LL | type MpuConfig: MyDisplay = T; ... LL | impl MPU for S { } | ^^^ the trait `MyDisplay` is not implemented for `T` - | - = note: required because of the requirements on the impl of `MyDisplay` for `::MpuConfig` error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/issue-65774-2.stderr b/src/test/ui/associated-types/issue-65774-2.stderr index dadf229bd5d16..5b3986407bc4c 100644 --- a/src/test/ui/associated-types/issue-65774-2.stderr +++ b/src/test/ui/associated-types/issue-65774-2.stderr @@ -16,8 +16,6 @@ LL | type MpuConfig: MyDisplay = T; ... LL | impl MPU for S { } | ^^^ the trait `MyDisplay` is not implemented for `T` - | - = note: required because of the requirements on the impl of `MyDisplay` for `::MpuConfig` error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr b/src/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr index cdc9559cd95e9..dac713567b5e2 100644 --- a/src/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr +++ b/src/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr @@ -8,8 +8,6 @@ LL | type Assoc: Bar; ... LL | type Assoc = bool; | ^^^^ the trait `Bar` is not implemented for `bool` - | - = note: required because of the requirements on the impl of `Bar` for `<() as Foo>::Assoc` error[E0277]: the trait bound `bool: Bar` is not satisfied --> $DIR/point-at-type-on-obligation-failure-2.rs:16:18 @@ -19,8 +17,6 @@ LL | trait Baz where Self::Assoc: Bar { ... LL | type Assoc = bool; | ^^^^ the trait `Bar` is not implemented for `bool` - | - = note: required because of the requirements on the impl of `Bar` for `<() as Baz>::Assoc` error[E0277]: the trait bound `bool: Bar` is not satisfied --> $DIR/point-at-type-on-obligation-failure-2.rs:24:18 @@ -30,8 +26,6 @@ LL | trait Bat where ::Assoc: Bar { ... LL | type Assoc = bool; | ^^^^ the trait `Bar` is not implemented for `bool` - | - = note: required because of the requirements on the impl of `Bar` for `<() as Bat>::Assoc` error: aborting due to 3 previous errors diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr index b1437a3669279..4e7b513629d05 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr @@ -9,7 +9,6 @@ LL | impl Foo for (T,) { } | = help: within `(T,)`, the trait `std::marker::Send` is not implemented for `T` = note: required because it appears within the type `(T,)` - = note: required because of the requirements on the impl of `std::marker::Send` for `(T,)` help: consider further restricting this bound | LL | impl Foo for (T,) { } @@ -26,7 +25,6 @@ LL | impl Foo for (T,T) { } | = help: within `(T, T)`, the trait `std::marker::Sync` is not implemented for `T` = note: required because it appears within the type `(T, T)` - = note: required because of the requirements on the impl of `std::marker::Sync` for `(T, T)` help: consider further restricting this bound | LL | impl Foo for (T,T) { } diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr index 8555c843a9342..3fb1af3a67cc2 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -11,7 +11,6 @@ LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { } | = help: within `X`, the trait `std::marker::Send` is not implemented for `T` = note: required because it appears within the type `X` - = note: required because of the requirements on the impl of `std::marker::Send` for `X` help: consider further restricting this bound | LL | impl RequiresRequiresShareAndSend for X { } diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr index b4f22f2d68fc9..592cc3b1c4ec1 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr @@ -8,7 +8,6 @@ LL | impl Foo for std::rc::Rc { } | ^^^ `std::rc::Rc` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::rc::Rc` error: aborting due to previous error diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr index 1334997c3d93b..9c5073a1e49d7 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr @@ -8,7 +8,6 @@ LL | impl Foo for T { } | ^^^ `T` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `T` - = note: required because of the requirements on the impl of `std::marker::Send` for `T` help: consider further restricting this bound | LL | impl Foo for T { } diff --git a/src/test/ui/dst/dst-sized-trait-param.stderr b/src/test/ui/dst/dst-sized-trait-param.stderr index 14c7d02c2586b..749d569b9aedc 100644 --- a/src/test/ui/dst/dst-sized-trait-param.stderr +++ b/src/test/ui/dst/dst-sized-trait-param.stderr @@ -9,7 +9,6 @@ LL | impl Foo<[isize]> for usize { } | = help: the trait `std::marker::Sized` is not implemented for `[isize]` = note: to learn more, visit - = note: required because of the requirements on the impl of `std::marker::Sized` for `[isize]` error[E0277]: the size for values of type `[usize]` cannot be known at compilation time --> $DIR/dst-sized-trait-param.rs:10:6 @@ -22,7 +21,6 @@ LL | impl Foo for [usize] { } | = help: the trait `std::marker::Sized` is not implemented for `[usize]` = note: to learn more, visit - = note: required because of the requirements on the impl of `std::marker::Sized` for `[usize]` error: aborting due to 2 previous errors diff --git a/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr b/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr index 3f06dfdccd868..95f4aa9e6dbaa 100644 --- a/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr +++ b/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr @@ -9,7 +9,6 @@ LL | impl Tsized for () {} | = help: the trait `std::marker::Sized` is not implemented for `[()]` = note: to learn more, visit - = note: required because of the requirements on the impl of `std::marker::Sized` for `[()]` error: aborting due to previous error diff --git a/src/test/ui/impl-bounds-checking.stderr b/src/test/ui/impl-bounds-checking.stderr index 6453508410ead..8698ed6e875f3 100644 --- a/src/test/ui/impl-bounds-checking.stderr +++ b/src/test/ui/impl-bounds-checking.stderr @@ -6,8 +6,6 @@ LL | trait Getter { ... LL | impl Getter for isize { | ^^^^^^^^^^^^^ the trait `Clone2` is not implemented for `isize` - | - = note: required because of the requirements on the impl of `Clone2` for `isize` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-10412.stderr b/src/test/ui/issues/issue-10412.stderr index 9c50b4af9a993..888576c43365f 100644 --- a/src/test/ui/issues/issue-10412.stderr +++ b/src/test/ui/issues/issue-10412.stderr @@ -57,7 +57,6 @@ LL | impl<'self> Serializable for &'self str { | = help: the trait `std::marker::Sized` is not implemented for `str` = note: to learn more, visit - = note: required because of the requirements on the impl of `std::marker::Sized` for `str` error: aborting due to 9 previous errors diff --git a/src/test/ui/issues/issue-43784-associated-type.stderr b/src/test/ui/issues/issue-43784-associated-type.stderr index fa835f5543ded..d8e9110fbbd1d 100644 --- a/src/test/ui/issues/issue-43784-associated-type.stderr +++ b/src/test/ui/issues/issue-43784-associated-type.stderr @@ -4,7 +4,6 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied LL | type Assoc = T; | ^ the trait `std::marker::Copy` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `::Assoc` help: consider restricting type parameter `T` | LL | impl Complete for T { diff --git a/src/test/ui/issues/issue-43784-supertrait.stderr b/src/test/ui/issues/issue-43784-supertrait.stderr index 86c0f8f597bef..2fb0583ee7d59 100644 --- a/src/test/ui/issues/issue-43784-supertrait.stderr +++ b/src/test/ui/issues/issue-43784-supertrait.stderr @@ -4,7 +4,6 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied LL | impl Complete for T {} | ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `T` help: consider restricting type parameter `T` | LL | impl Complete for T {} diff --git a/src/test/ui/issues/issue-65673.stderr b/src/test/ui/issues/issue-65673.stderr index d1a490eb5657d..6778ab8bfe4f2 100644 --- a/src/test/ui/issues/issue-65673.stderr +++ b/src/test/ui/issues/issue-65673.stderr @@ -11,7 +11,6 @@ LL | type Ctx = dyn Alias; | = help: the trait `std::marker::Sized` is not implemented for `(dyn Trait + 'static)` = note: to learn more, visit - = note: required because of the requirements on the impl of `std::marker::Sized` for `::Ctx` error: aborting due to previous error diff --git a/src/test/ui/malformed/malformed-derive-entry.stderr b/src/test/ui/malformed/malformed-derive-entry.stderr index 74606b71bf12e..2c45a498240ef 100644 --- a/src/test/ui/malformed/malformed-derive-entry.stderr +++ b/src/test/ui/malformed/malformed-derive-entry.stderr @@ -27,7 +27,6 @@ LL | #[derive(Copy(Bad))] LL | pub trait Copy: Clone { | ----- required by this bound in `std::marker::Copy` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `Test1` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Test2: std::clone::Clone` is not satisfied @@ -41,7 +40,6 @@ LL | #[derive(Copy="bad")] LL | pub trait Copy: Clone { | ----- required by this bound in `std::marker::Copy` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `Test2` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr index 91e45df8d3ef9..f499c1f569859 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr +++ b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr @@ -7,7 +7,6 @@ LL | LL | default impl Foo<'static, U> for () {} | ^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `U` | - = note: required because of the requirements on the impl of `std::cmp::Eq` for `U` help: consider restricting type parameter `U` | LL | default impl Foo<'static, U> for () {} diff --git a/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr b/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr index 2091e30f11593..c5510bfa3f2fe 100644 --- a/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr +++ b/src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr @@ -28,7 +28,6 @@ LL | type Assoc = ChildWrapper; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Child` is not implemented for `::Assoc` | = note: required because of the requirements on the impl of `Child` for `ChildWrapper<::Assoc>` - = note: required because of the requirements on the impl of `Child< as Parent>::Ty>` for ` as Parent>::Assoc` error[E0277]: the trait bound `::Assoc: Child` is not satisfied --> $DIR/missing-assoc-type-bound-restriction.rs:20:5 diff --git a/src/test/ui/traits/cycle-cache-err-60010.stderr b/src/test/ui/traits/cycle-cache-err-60010.stderr index 9e2e5568ba249..356b90d064623 100644 --- a/src/test/ui/traits/cycle-cache-err-60010.stderr +++ b/src/test/ui/traits/cycle-cache-err-60010.stderr @@ -21,7 +21,6 @@ LL | type Storage = SalsaStorage; = note: required because of the requirements on the impl of `SourceDatabase` for `RootDatabase` = note: required because of the requirements on the impl of `Query` for `ParseQuery` = note: required because it appears within the type `SalsaStorage` - = note: required because of the requirements on the impl of `std::marker::Sized` for `::Storage` error: aborting due to 2 previous errors diff --git a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr index 502dd20105869..4cf054d177f66 100644 --- a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr +++ b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr @@ -11,7 +11,6 @@ LL | impl T2 for S4 { | = help: the trait `std::marker::Sized` is not implemented for `X` = note: to learn more, visit - = note: required because of the requirements on the impl of `std::marker::Sized` for `X` error: aborting due to previous error diff --git a/src/test/ui/unsized7.stderr b/src/test/ui/unsized7.stderr index cd30c98f55d0d..d18644f005a88 100644 --- a/src/test/ui/unsized7.stderr +++ b/src/test/ui/unsized7.stderr @@ -11,7 +11,6 @@ LL | impl T1 for S3 { | = help: the trait `std::marker::Sized` is not implemented for `X` = note: to learn more, visit - = note: required because of the requirements on the impl of `std::marker::Sized` for `X` error: aborting due to previous error