diff options
Diffstat (limited to 'src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr')
-rw-r--r-- | src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr new file mode 100644 index 000000000..8e0f23716 --- /dev/null +++ b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr @@ -0,0 +1,23 @@ +error[E0271]: type mismatch resolving `<T as Deref>::Target == T` + --> $DIR/issue-68656-unsized-values.rs:15: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:6: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`. |