]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
Rollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum
[rust.git] / tests / 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:13:21
3    |
4 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<T> for T {
5    |      - this type parameter
6 LL |     type Item<'a> = T;
7    |                     ^ expected type parameter `T`, found associated type
8    |
9    = note: expected type parameter `T`
10              found associated type `<T as Deref>::Target`
11 note: required by a bound in `UnsafeCopy::Item`
12   --> $DIR/issue-68656-unsized-values.rs:4:36
13    |
14 LL |     type Item<'a>: std::ops::Deref<Target = T>;
15    |                                    ^^^^^^^^^^ required by this bound in `UnsafeCopy::Item`
16 help: consider further restricting this bound
17    |
18 LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<T> for T {
19    |                                +++++++++++++++++++
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0271`.