]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsized5.stderr
Auto merge of #60132 - davidtwco:issue-60075, r=estebank
[rust.git] / src / test / ui / unsized5.stderr
1 error[E0277]: the size for values of type `X` cannot be known at compilation time
2   --> $DIR/unsized5.rs:4:5
3    |
4 LL |     f1: X,
5    |     ^^^^^ doesn't have a size known at compile-time
6    |
7    = help: the trait `std::marker::Sized` is not implemented for `X`
8    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
9    = help: consider adding a `where X: std::marker::Sized` bound
10    = note: only the last field of a struct may have a dynamically sized type
11
12 error[E0277]: the size for values of type `X` cannot be known at compilation time
13   --> $DIR/unsized5.rs:10:5
14    |
15 LL |     g: X,
16    |     ^^^^ doesn't have a size known at compile-time
17    |
18    = help: the trait `std::marker::Sized` is not implemented for `X`
19    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
20    = help: consider adding a `where X: std::marker::Sized` bound
21    = note: only the last field of a struct may have a dynamically sized type
22
23 error[E0277]: the size for values of type `str` cannot be known at compilation time
24   --> $DIR/unsized5.rs:15:5
25    |
26 LL |     f: str,
27    |     ^^^^^^ doesn't have a size known at compile-time
28    |
29    = help: the trait `std::marker::Sized` is not implemented for `str`
30    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
31    = note: only the last field of a struct may have a dynamically sized type
32
33 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
34   --> $DIR/unsized5.rs:20:5
35    |
36 LL |     f: [u8],
37    |     ^^^^^^^ doesn't have a size known at compile-time
38    |
39    = help: the trait `std::marker::Sized` is not implemented for `[u8]`
40    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
41    = note: only the last field of a struct may have a dynamically sized type
42
43 error[E0277]: the size for values of type `X` cannot be known at compilation time
44   --> $DIR/unsized5.rs:25:8
45    |
46 LL |     V1(X, isize),
47    |        ^ doesn't have a size known at compile-time
48    |
49    = help: the trait `std::marker::Sized` is not implemented for `X`
50    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
51    = help: consider adding a `where X: std::marker::Sized` bound
52    = note: no field of an enum variant may have a dynamically sized type
53
54 error[E0277]: the size for values of type `X` cannot be known at compilation time
55   --> $DIR/unsized5.rs:29:8
56    |
57 LL |     V2{f1: X, f: isize},
58    |        ^^^^^ doesn't have a size known at compile-time
59    |
60    = help: the trait `std::marker::Sized` is not implemented for `X`
61    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
62    = help: consider adding a `where X: std::marker::Sized` bound
63    = note: no field of an enum variant may have a dynamically sized type
64
65 error: aborting due to 6 previous errors
66
67 For more information about this error, try `rustc --explain E0277`.