mirror of https://github.com/rust-lang/rust
24 lines
954 B
Plaintext
24 lines
954 B
Plaintext
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 {
|
|
| - expected 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<Target = T>> UnsafeCopy<T> for T {
|
|
| ++++++++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0271`.
|