]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / ui / generic-associated-types / issue-68656-unsized-values.stderr
1 error[E0271]: type mismatch resolving `<T as Deref>::Target == T`
2   --> $DIR/issue-68656-unsized-values.rs:15:5
3    |
4 LL |     type Item<'a>: std::ops::Deref<Target = T>;
5    |                                    ---------- required by this bound in `UnsafeCopy::Item`
6 ...
7 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<T> for T {
8    |      - this type parameter
9 LL |     type Item<'a> = T;
10    |     ^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type
11    |
12    = note: expected type parameter `T`
13              found associated type `<T as Deref>::Target`
14 help: consider further restricting this bound
15    |
16 LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<T> for T {
17    |                                ^^^^^^^^^^^^^^^^^^^
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0271`.