summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
blob: e8770aedfa1c7940318acbd9200731fa2a91b362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error[E0271]: type mismatch resolving `<T as Deref>::Target == T`
  --> $DIR/issue-68656-unsized-values.rs:13:21
   |
LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<T> for T {
   |      - this type parameter
LL |     type Item<'a> = T;
   |                     ^ expected type parameter `T`, found associated type
   |
   = note: expected type parameter `T`
             found associated type `<T as Deref>::Target`
note: required by a bound in `UnsafeCopy::Item`
  --> $DIR/issue-68656-unsized-values.rs:4:36
   |
LL |     type Item<'a>: std::ops::Deref<Target = T>;
   |                                    ^^^^^^^^^^ required by this bound in `UnsafeCopy::Item`
help: consider further restricting this bound
   |
LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<T> for T {
   |                                +++++++++++++++++++

error: aborting due to previous error

For more information about this error, try `rustc --explain E0271`.