]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsized6.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / unsized6.stderr
1 error[E0277]: the size for values of type `Y` cannot be known at compilation time
2   --> $DIR/unsized6.rs:19:9
3    |
4 LL |     let y: Y;
5    |         ^ doesn't have a size known at compile-time
6    |
7    = help: the trait `std::marker::Sized` is not implemented for `Y`
8    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
9    = help: consider adding a `where Y: std::marker::Sized` bound
10    = note: all local variables must have a statically known size
11
12 error[E0277]: the size for values of type `X` cannot be known at compilation time
13   --> $DIR/unsized6.rs:17:12
14    |
15 LL |     let _: (isize, (X, isize));
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/second-edition/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 element of a tuple may have a dynamically sized type
22
23 error[E0277]: the size for values of type `Z` cannot be known at compilation time
24   --> $DIR/unsized6.rs:21:12
25    |
26 LL |     let y: (isize, (Z, usize));
27    |            ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
28    |
29    = help: the trait `std::marker::Sized` is not implemented for `Z`
30    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
31    = help: consider adding a `where Z: std::marker::Sized` bound
32    = note: only the last element of a tuple may have a dynamically sized type
33
34 error[E0277]: the size for values of type `X` cannot be known at compilation time
35   --> $DIR/unsized6.rs:25:9
36    |
37 LL |     let y: X;
38    |         ^ doesn't have a size known at compile-time
39    |
40    = help: the trait `std::marker::Sized` is not implemented for `X`
41    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
42    = help: consider adding a `where X: std::marker::Sized` bound
43    = note: all local variables must have a statically known size
44
45 error[E0277]: the size for values of type `Y` cannot be known at compilation time
46   --> $DIR/unsized6.rs:27:12
47    |
48 LL |     let y: (isize, (Y, isize));
49    |            ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
50    |
51    = help: the trait `std::marker::Sized` is not implemented for `Y`
52    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
53    = help: consider adding a `where Y: std::marker::Sized` bound
54    = note: only the last element of a tuple may have a dynamically sized type
55
56 error[E0277]: the size for values of type `X` cannot be known at compilation time
57   --> $DIR/unsized6.rs:32:9
58    |
59 LL |     let y: X = *x1;
60    |         ^ doesn't have a size known at compile-time
61    |
62    = help: the trait `std::marker::Sized` is not implemented for `X`
63    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
64    = help: consider adding a `where X: std::marker::Sized` bound
65    = note: all local variables must have a statically known size
66
67 error[E0277]: the size for values of type `X` cannot be known at compilation time
68   --> $DIR/unsized6.rs:34:9
69    |
70 LL |     let y = *x2;
71    |         ^ doesn't have a size known at compile-time
72    |
73    = help: the trait `std::marker::Sized` is not implemented for `X`
74    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
75    = help: consider adding a `where X: std::marker::Sized` bound
76    = note: all local variables must have a statically known size
77
78 error[E0277]: the size for values of type `X` cannot be known at compilation time
79   --> $DIR/unsized6.rs:36:10
80    |
81 LL |     let (y, z) = (*x3, 4);
82    |          ^ doesn't have a size known at compile-time
83    |
84    = help: the trait `std::marker::Sized` is not implemented for `X`
85    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
86    = help: consider adding a `where X: std::marker::Sized` bound
87    = note: all local variables must have a statically known size
88
89 error[E0277]: the size for values of type `X` cannot be known at compilation time
90   --> $DIR/unsized6.rs:40:9
91    |
92 LL |     let y: X = *x1;
93    |         ^ doesn't have a size known at compile-time
94    |
95    = help: the trait `std::marker::Sized` is not implemented for `X`
96    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
97    = help: consider adding a `where X: std::marker::Sized` bound
98    = note: all local variables must have a statically known size
99
100 error[E0277]: the size for values of type `X` cannot be known at compilation time
101   --> $DIR/unsized6.rs:42:9
102    |
103 LL |     let y = *x2;
104    |         ^ doesn't have a size known at compile-time
105    |
106    = help: the trait `std::marker::Sized` is not implemented for `X`
107    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
108    = help: consider adding a `where X: std::marker::Sized` bound
109    = note: all local variables must have a statically known size
110
111 error[E0277]: the size for values of type `X` cannot be known at compilation time
112   --> $DIR/unsized6.rs:44:10
113    |
114 LL |     let (y, z) = (*x3, 4);
115    |          ^ doesn't have a size known at compile-time
116    |
117    = help: the trait `std::marker::Sized` is not implemented for `X`
118    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
119    = help: consider adding a `where X: std::marker::Sized` bound
120    = note: all local variables must have a statically known size
121
122 error[E0277]: the size for values of type `X` cannot be known at compilation time
123   --> $DIR/unsized6.rs:48:18
124    |
125 LL | fn g1<X: ?Sized>(x: X) {}
126    |                  ^ doesn't have a size known at compile-time
127    |
128    = help: the trait `std::marker::Sized` is not implemented for `X`
129    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
130    = help: consider adding a `where X: std::marker::Sized` bound
131    = note: all local variables must have a statically known size
132
133 error[E0277]: the size for values of type `X` cannot be known at compilation time
134   --> $DIR/unsized6.rs:50:22
135    |
136 LL | fn g2<X: ?Sized + T>(x: X) {}
137    |                      ^ doesn't have a size known at compile-time
138    |
139    = help: the trait `std::marker::Sized` is not implemented for `X`
140    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
141    = help: consider adding a `where X: std::marker::Sized` bound
142    = note: all local variables must have a statically known size
143
144 error: aborting due to 13 previous errors
145
146 For more information about this error, try `rustc --explain E0277`.