]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/hr-associated-type-projection-1.stderr
Auto merge of #76044 - ecstatic-morse:dataflow-lattice, r=oli-obk
[rust.git] / src / test / ui / associated-types / hr-associated-type-projection-1.stderr
1 error[E0277]: the trait bound `for<'b> <T as UnsafeCopy<'b, T>>::Item: Deref` is not satisfied
2   --> $DIR/hr-associated-type-projection-1.rs:15:17
3    |
4 LL | trait UnsafeCopy<'a, T: Copy>
5    |       ---------- required by a bound in this
6 LL | where
7 LL |     for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>,
8    |                                                --------------------------- required by this bound in `UnsafeCopy`
9 ...
10 LL |     type Item = T;
11    |                 ^ the trait `for<'b> Deref` is not implemented for `<T as UnsafeCopy<'b, T>>::Item`
12    |
13    = help: the following implementations were found:
14              <&T as Deref>
15              <&mut T as Deref>
16
17 error[E0277]: the trait bound `<T as UnsafeCopy<'b, T>>::Item: Deref` is not satisfied
18   --> $DIR/hr-associated-type-projection-1.rs:13:33
19    |
20 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T {
21    |                                 ^^^^^^^^^^^^^^^^^ the trait `Deref` is not implemented for `<T as UnsafeCopy<'b, T>>::Item`
22    |
23 help: consider further restricting the associated type
24    |
25 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T where <T as UnsafeCopy<'b, T>>::Item: Deref {
26    |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
28 error: aborting due to 2 previous errors
29
30 For more information about this error, try `rustc --explain E0277`.