]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issue-20005.stderr
Move some `compile-fail` tests to `ui`
[rust.git] / src / test / ui / issue-20005.stderr
1 error[E0277]: the size for values of type `Self` cannot be known at compilation time
2   --> $DIR/issue-20005.rs:18:5
3    |
4 LL | /     fn to<Dst>(  //~ ERROR the size for values of type
5 LL | |         self
6 LL | |     ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
7 LL | |         From::from(self)
8 LL | |     }
9    | |_____^ doesn't have a size known at compile-time
10    |
11    = help: the trait `std::marker::Sized` is not implemented for `Self`
12    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
13    = help: consider adding a `where Self: std::marker::Sized` bound
14 note: required by `From`
15   --> $DIR/issue-20005.rs:11:1
16    |
17 LL | trait From<Src> {
18    | ^^^^^^^^^^^^^^^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0277`.