]> git.lizzy.rs Git - rust.git/commitdiff
Do not emit note for projected derived obligations
authorEsteban Küber <esteban@kuber.com.ar>
Sat, 11 Apr 2020 21:14:16 +0000 (14:14 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Sat, 18 Apr 2020 23:37:08 +0000 (16:37 -0700)
29 files changed:
src/librustc_middle/traits/mod.rs
src/librustc_middle/traits/structural_impls.rs
src/librustc_trait_selection/traits/error_reporting/on_unimplemented.rs
src/librustc_trait_selection/traits/error_reporting/suggestions.rs
src/librustc_trait_selection/traits/wf.rs
src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
src/test/ui/associated-types/defaults-unsound-62211-1.stderr
src/test/ui/associated-types/defaults-unsound-62211-2.stderr
src/test/ui/associated-types/issue-43924.stderr
src/test/ui/associated-types/issue-65774-1.stderr
src/test/ui/associated-types/issue-65774-2.stderr
src/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr
src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr
src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr
src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr
src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr
src/test/ui/dst/dst-sized-trait-param.stderr
src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr
src/test/ui/impl-bounds-checking.stderr
src/test/ui/issues/issue-10412.stderr
src/test/ui/issues/issue-43784-associated-type.stderr
src/test/ui/issues/issue-43784-supertrait.stderr
src/test/ui/issues/issue-65673.stderr
src/test/ui/malformed/malformed-derive-entry.stderr
src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr
src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr
src/test/ui/traits/cycle-cache-err-60010.stderr
src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr
src/test/ui/unsized7.stderr

index 47c8aa023f0439c69b6bb718ca61ad6030dcd5ad..d22a4ac298efeff2e8a8926f7ba1ea59f89dba9f 100644 (file)
@@ -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
index b7d0f6666bd38faee505f95aad70bd354d7c216d..5831cb3859f81773f85f58496157c23d3cf8bcd7 100644 (file)
@@ -456,6 +456,7 @@ fn lift_to_tcx(&self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
             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,
index 1ecc7fdafc442bbfb1fbd38c9b30d3d1d5d0490c..e9f55c24256c718b8143bf1cc08abfd0a7236433 100644 (file)
@@ -134,7 +134,8 @@ fn on_unimplemented_note(
 
         match obligation.cause.code {
             ObligationCauseCode::BuiltinDerivedObligation(..)
-            | ObligationCauseCode::ImplDerivedObligation(..) => {}
+            | ObligationCauseCode::ImplDerivedObligation(..)
+            | ObligationCauseCode::DerivedObligation(..) => {}
             _ => {
                 // this is a "direct", user-specified, rather than derived,
                 // obligation.
index 52bf2e6ad490cfdda79054b7dcaec994c3e797bc..9a6a6fefa7c7150b3f9e2f71579242dc8d8b048d 100644 (file)
@@ -1135,7 +1135,8 @@ fn maybe_note_obligation_cause_for_async_await(
         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 @@ fn note_obligation_cause_code<T>(
                     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 \
index 0cda92b7dc8b46d969c2e8b42e9546c68ea86c07..f6953971ef5bcbbc74e618caa43caedd597f5585 100644 (file)
@@ -243,7 +243,7 @@ fn compute_trait_ref(&mut self, trait_ref: &ty::TraitRef<'tcx>, elaborate: Elabo
                         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,
index dd2f30e6dc040c05f2ccc677846d54495447bdd6..96e690631894dfc5c5884f516a470f857d0f9bf2 100644 (file)
@@ -11,7 +11,6 @@ LL | impl Case1 for S1 {
    |      ^^^^^ `<L1 as Lam<&'a u8>>::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 `<L1 as Lam<&'a u8>>::App`
-   = note: required because of the requirements on the impl of `for<'a> std::fmt::Debug` for `<<<<S1 as Case1>::C as std::iter::Iterator>::Item as std::iter::Iterator>::Item as Lam<&'a u8>>::App`
 
 error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterator
   --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
index c4ab7b6e26e51ac8f2d4ce3bbcf9e490b655d94d..7bf75f3839c0ebab1e19b60d6434fd6f39c328bc 100644 (file)
@@ -53,7 +53,6 @@ LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::fmt::Display> UncheckedCopy for T {}
@@ -71,7 +70,6 @@ LL |     + Deref<Target = str>
 LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::Deref> UncheckedCopy for T {}
@@ -90,7 +88,6 @@ LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::AddAssign<&'static str>> UncheckedCopy for T {}
@@ -108,7 +105,6 @@ LL |     type Output: Copy
 LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> UncheckedCopy for T {}
index c311a9f456e798122179d925684b68f07b059382..b6d889515b6fbe6408ab1b854176488757c7b0a0 100644 (file)
@@ -53,7 +53,6 @@ LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::fmt::Display> UncheckedCopy for T {}
@@ -71,7 +70,6 @@ LL |     + Deref<Target = str>
 LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::Deref> UncheckedCopy for T {}
@@ -90,7 +88,6 @@ LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::ops::AddAssign<&'static str>> UncheckedCopy for T {}
@@ -108,7 +105,6 @@ LL |     type Output: Copy
 LL | impl<T> 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 `<T as UncheckedCopy>::Output`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> UncheckedCopy for T {}
index 38dd8b66a6ed5a3e7804b55d8817bc7bb3c2677e..58f71b8b14ed291fa313ef8a8bfa5f6b852c98f9 100644 (file)
@@ -16,8 +16,6 @@ LL |     type Out: Default + ToString + ?Sized = dyn ToString;
 ...
 LL | impl Foo<u32> 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<u32>>::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<u64> 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<u64>>::Out`
 
 error: aborting due to 3 previous errors
 
index ae3ebe811e2abd88d850b64726235b60d66fb17a..2e5a1ebf19afa698afa322b4f0212b7bcbebd6ae 100644 (file)
@@ -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 `<S as MPU>::MpuConfig`
 
 error: aborting due to 2 previous errors
 
index dadf229bd5d16f170a2819630a63df1c8bc08d44..5b3986407bc4c82029fafb99eaf2e9fc013d91b8 100644 (file)
@@ -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 `<S as MPU>::MpuConfig`
 
 error: aborting due to 2 previous errors
 
index cdc9559cd95e983a13ebf4bf70b9a29f63258508..dac713567b5e27f5129131775010d56913a863cd 100644 (file)
@@ -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 <Self as Bat>::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
 
index b1437a3669279b5d475fa58a11719285fff12021..4e7b513629d0512fdab25ab6c6d3eda8ff43ae90 100644 (file)
@@ -9,7 +9,6 @@ LL | impl <T: Sync+'static> 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 <T: Sync+'static + std::marker::Send> Foo for (T,) { }
@@ -26,7 +25,6 @@ LL | impl <T: Send> 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 <T: Send + std::marker::Sync> Foo for (T,T) { }
index 8555c843a9342bab0f3445d25cf4bec18cdbed6c..3fb1af3a67cc225b4149642fd4a65250fbe99a2f 100644 (file)
@@ -11,7 +11,6 @@ LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
    |
    = help: within `X<T>`, the trait `std::marker::Send` is not implemented for `T`
    = note: required because it appears within the type `X<T>`
-   = note: required because of the requirements on the impl of `std::marker::Send` for `X<T>`
 help: consider further restricting this bound
    |
 LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }
index b4f22f2d68fc97c0b411b5a9d3464dfecd23fe1e..592cc3b1c4ec1e747fd53b4e1560802c6b5a42aa 100644 (file)
@@ -8,7 +8,6 @@ LL | impl Foo for std::rc::Rc<i8> { }
    |      ^^^ `std::rc::Rc<i8>` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc<i8>`
-   = note: required because of the requirements on the impl of `std::marker::Send` for `std::rc::Rc<i8>`
 
 error: aborting due to previous error
 
index 1334997c3d93b3d8ae0c5fd63f50722cde51461b..9c5073a1e49d73b94468cb47c4981f9a1450571b 100644 (file)
@@ -8,7 +8,6 @@ LL | impl <T: Sync+'static> 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 <T: Sync+'static + std::marker::Send> Foo for T { }
index 14c7d02c2586bb49039c5c03cb59970f4bd2e322..749d569b9aedc46d487c3ab5a54284133a5ae0a0 100644 (file)
@@ -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 <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = 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<isize> for [usize] { }
    |
    = help: the trait `std::marker::Sized` is not implemented for `[usize]`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = note: required because of the requirements on the impl of `std::marker::Sized` for `[usize]`
 
 error: aborting due to 2 previous errors
 
index 3f06dfdccd868f51324b0ae1e1f89ef50a44dbfc..95f4aa9e6dbaa749c272752699726ce9c8189d19 100644 (file)
@@ -9,7 +9,6 @@ LL | impl Tsized for () {}
    |
    = help: the trait `std::marker::Sized` is not implemented for `[()]`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = note: required because of the requirements on the impl of `std::marker::Sized` for `[()]`
 
 error: aborting due to previous error
 
index 6453508410eade0299f11837692d1da0f60076ca..8698ed6e875f306f1a4227c789b7eedab51d3351 100644 (file)
@@ -6,8 +6,6 @@ LL | trait Getter<T: Clone2> {
 ...
 LL | impl Getter<isize> 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
 
index 9c50b4af9a99306e366c4446d9009c61e908795c..888576c43365f912ab2f2c4b307def62e05476e1 100644 (file)
@@ -57,7 +57,6 @@ LL | impl<'self> Serializable<str> for &'self str {
    |
    = help: the trait `std::marker::Sized` is not implemented for `str`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = note: required because of the requirements on the impl of `std::marker::Sized` for `str`
 
 error: aborting due to 9 previous errors
 
index fa835f5543dedeccd94d14ccaa2a6b2e8e107627..d8e9110fbbd1d66a02984dc0761bfaf89f559c03 100644 (file)
@@ -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 `<T as Complete>::Assoc`
 help: consider restricting type parameter `T`
    |
 LL | impl<T: std::marker::Copy> Complete for T {
index 86c0f8f597bef58591232939acdfdd33100d8db6..2fb0583ee7d593ae16fe4c96793ee8d2da5f0498 100644 (file)
@@ -4,7 +4,6 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
 LL | impl<T> 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<T: std::marker::Copy> Complete for T {}
index d1a490eb5657d15947fe81dac904f0711c5f6f58..6778ab8bfe4f29550a6ee6f30d6253a8cb191a8b 100644 (file)
@@ -11,7 +11,6 @@ LL |     type Ctx = dyn Alias<T>;
    |
    = help: the trait `std::marker::Sized` is not implemented for `(dyn Trait + 'static)`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = note: required because of the requirements on the impl of `std::marker::Sized` for `<T as WithType>::Ctx`
 
 error: aborting due to previous error
 
index 74606b71bf12e59fa21e103075e67081b93e25a4..2c45a498240efccda7a64f401eecf09844c72766 100644 (file)
@@ -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
index 91e45df8d3ef939c78bd885160add8c88384eb09..f499c1f5698595e1de2a708386d8d5605265e67a 100644 (file)
@@ -7,7 +7,6 @@ LL |
 LL | default impl<U> 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<U: std::cmp::Eq> Foo<'static, U> for () {}
index 2091e30f115939a23024e80bfd861f28a81423fc..c5510bfa3f2fed9a678ae0fa43386fc482c4567e 100644 (file)
@@ -28,7 +28,6 @@ LL |     type Assoc = ChildWrapper<T::Assoc>;
    |                  ^^^^^^^^^^^^^^^^^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
    |
    = note: required because of the requirements on the impl of `Child<A>` for `ChildWrapper<<T as Parent>::Assoc>`
-   = note: required because of the requirements on the impl of `Child<<ParentWrapper<T> as Parent>::Ty>` for `<ParentWrapper<T> as Parent>::Assoc`
 
 error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
   --> $DIR/missing-assoc-type-bound-restriction.rs:20:5
index 9e2e5568ba249524d3b9b0701e3b111a0197a7b7..356b90d0646236512e4117ce462362045621bebc 100644 (file)
@@ -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<RootDatabase>` 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 `<RootDatabase as Database>::Storage`
 
 error: aborting due to 2 previous errors
 
index 502dd2010586970112105434c771bc0804d4a32d..4cf054d177f6624476794b56deec67457a3ba9ca 100644 (file)
@@ -11,7 +11,6 @@ LL | impl<X: ?Sized> T2<X> for S4<X> {
    |
    = help: the trait `std::marker::Sized` is not implemented for `X`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = note: required because of the requirements on the impl of `std::marker::Sized` for `X`
 
 error: aborting due to previous error
 
index cd30c98f55d0d3dee049619b63ddb9f325bd50c1..d18644f005a887d4742b3c0ca5c39116256191fb 100644 (file)
@@ -11,7 +11,6 @@ LL | impl<X: ?Sized + T> T1<X> for S3<X> {
    |
    = help: the trait `std::marker::Sized` is not implemented for `X`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = note: required because of the requirements on the impl of `std::marker::Sized` for `X`
 
 error: aborting due to previous error