]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/unsized/unsized-trait-impl-self-type.stderr
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / unsized / unsized-trait-impl-self-type.stderr
index c2b2fe40ce67f099c0f7a8e8d6440c4607124819..73c5439da53b67e83e3c1b66033ef78a04b7ce43 100644 (file)
@@ -11,6 +11,13 @@ LL | impl<X: ?Sized> T3<X> for S5<X> {
    |
    = help: the trait `std::marker::Sized` is not implemented for `X`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
+help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box<Y>`
+  --> $DIR/unsized-trait-impl-self-type.rs:8:11
+   |
+LL | struct S5<Y>(Y);
+   |           ^  - ...if indirection was used here: `Box<Y>`
+   |           |
+   |           this could be changed to `Y: ?Sized`...
 
 error: aborting due to previous error