]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsized3.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / unsized3.stderr
1 error[E0277]: the size for values of type `X` cannot be known at compilation time
2   --> $DIR/unsized3.rs:17:5
3    |
4 LL |     f2::<X>(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/second-edition/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: required by `f2`
11   --> $DIR/unsized3.rs:20:1
12    |
13 LL | fn f2<X>(x: &X) {
14    | ^^^^^^^^^^^^^^^
15
16 error[E0277]: the size for values of type `X` cannot be known at compilation time
17   --> $DIR/unsized3.rs:28:5
18    |
19 LL |     f4::<X>(x);
20    |     ^^^^^^^ doesn't have a size known at compile-time
21    |
22    = help: the trait `std::marker::Sized` is not implemented for `X`
23    = 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>
24    = help: consider adding a `where X: std::marker::Sized` bound
25 note: required by `f4`
26   --> $DIR/unsized3.rs:31:1
27    |
28 LL | fn f4<X: T>(x: &X) {
29    | ^^^^^^^^^^^^^^^^^^
30
31 error[E0277]: the size for values of type `X` cannot be known at compilation time
32   --> $DIR/unsized3.rs:43:5
33    |
34 LL |     f5(x1);
35    |     ^^ doesn't have a size known at compile-time
36    |
37    = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
38    = 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>
39    = help: consider adding a `where X: std::marker::Sized` bound
40    = note: required because it appears within the type `S<X>`
41 note: required by `f5`
42   --> $DIR/unsized3.rs:34:1
43    |
44 LL | fn f5<Y>(x: &Y) {}
45    | ^^^^^^^^^^^^^^^
46
47 error[E0277]: the size for values of type `X` cannot be known at compilation time
48   --> $DIR/unsized3.rs:50:5
49    |
50 LL |     f5(&(*x1, 34));
51    |     ^^ doesn't have a size known at compile-time
52    |
53    = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
54    = 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>
55    = help: consider adding a `where X: std::marker::Sized` bound
56    = note: required because it appears within the type `S<X>`
57    = note: only the last element of a tuple may have a dynamically sized type
58
59 error[E0277]: the size for values of type `X` cannot be known at compilation time
60   --> $DIR/unsized3.rs:55:9
61    |
62 LL |     f5(&(32, *x1));
63    |         ^^^^^^^^^ doesn't have a size known at compile-time
64    |
65    = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X`
66    = 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>
67    = help: consider adding a `where X: std::marker::Sized` bound
68    = note: required because it appears within the type `S<X>`
69    = note: required because it appears within the type `({integer}, S<X>)`
70    = note: tuples must have a statically known size to be initialized
71
72 error[E0277]: the size for values of type `X` cannot be known at compilation time
73   --> $DIR/unsized3.rs:55:5
74    |
75 LL |     f5(&(32, *x1));
76    |     ^^ doesn't have a size known at compile-time
77    |
78    = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X`
79    = 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>
80    = help: consider adding a `where X: std::marker::Sized` bound
81    = note: required because it appears within the type `S<X>`
82    = note: required because it appears within the type `({integer}, S<X>)`
83 note: required by `f5`
84   --> $DIR/unsized3.rs:34:1
85    |
86 LL | fn f5<Y>(x: &Y) {}
87    | ^^^^^^^^^^^^^^^
88
89 error: aborting due to 6 previous errors
90
91 For more information about this error, try `rustc --explain E0277`.