]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / issue-68656-unsized-values.stderr
CommitLineData
1b1a35ee 1error[E0271]: type mismatch resolving `<T as Deref>::Target == T`
136023e0 2 --> $DIR/issue-68656-unsized-values.rs:15:5
f035d41b
XL
3 |
4LL | type Item<'a>: std::ops::Deref<Target = T>;
29967ef6 5 | ---------- required by this bound in `UnsafeCopy::Item`
f035d41b
XL
6...
7LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<T> for T {
8 | - this type parameter
9LL | type Item<'a> = T;
10 | ^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type
11 |
12 = note: expected type parameter `T`
1b1a35ee 13 found associated type `<T as Deref>::Target`
f035d41b
XL
14help: consider further restricting this bound
15 |
1b1a35ee
XL
16LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<T> for T {
17 | ^^^^^^^^^^^^^^^^^^^
f035d41b 18
136023e0 19error: aborting due to previous error
f035d41b
XL
20
21For more information about this error, try `rustc --explain E0271`.