]> git.proxmox.com Git - rustc.git/blob - src/test/ui/unsized/unsized-inherent-impl-self-type.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / unsized / unsized-inherent-impl-self-type.stderr
1 error[E0277]: the size for values of type `X` cannot be known at compilation time
2 --> $DIR/unsized-inherent-impl-self-type.rs:7:17
3 |
4 LL | struct S5<Y>(Y);
5 | - required by this bound in `S5`
6 LL |
7 LL | impl<X: ?Sized> S5<X> {
8 | - ^^^^^ doesn't have a size known at compile-time
9 | |
10 | this type parameter needs to be `Sized`
11 |
12 help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box<Y>`
13 --> $DIR/unsized-inherent-impl-self-type.rs:5:11
14 |
15 LL | struct S5<Y>(Y);
16 | ^ - ...if indirection were used here: `Box<Y>`
17 | |
18 | this could be changed to `Y: ?Sized`...
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0277`.