fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
3.9 KiB88 linesraw
1error[E0277]: the size for values of type `U` cannot be known at compilation time
2  --> $DIR/trait-suggest-where-clause.rs:9:20
3   |
4LL |     mem::size_of::<U>();
5   |                    ^ doesn't have a size known at compile-time
6   | 
7  ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
8   |
9LL | pub const fn size_of<T>() -> usize {
10   |                      - required by this bound in `std::mem::size_of`
11   |
12   = help: the trait `std::marker::Sized` is not implemented for `U`
13   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
14   = help: consider adding a `where U: std::marker::Sized` bound
15
16error[E0277]: the size for values of type `U` cannot be known at compilation time
17  --> $DIR/trait-suggest-where-clause.rs:12:5
18   |
19LL |     mem::size_of::<Misc<U>>();
20   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
21   | 
22  ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
23   |
24LL | pub const fn size_of<T>() -> usize {
25   |                      - required by this bound in `std::mem::size_of`
26   |
27   = help: within `Misc<U>`, the trait `std::marker::Sized` is not implemented for `U`
28   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
29   = help: consider adding a `where U: std::marker::Sized` bound
30   = note: required because it appears within the type `Misc<U>`
31
32error[E0277]: the trait bound `u64: std::convert::From<T>` is not satisfied
33  --> $DIR/trait-suggest-where-clause.rs:17:5
34   |
35LL |     <u64 as From<T>>::from;
36   |     ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `u64`
37   |
38   = help: consider adding a `where u64: std::convert::From<T>` bound
39   = note: required by `std::convert::From::from`
40
41error[E0277]: the trait bound `u64: std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
42  --> $DIR/trait-suggest-where-clause.rs:20:5
43   |
44LL |     <u64 as From<<T as Iterator>::Item>>::from;
45   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<<T as std::iter::Iterator>::Item>` is not implemented for `u64`
46   |
47   = help: consider adding a `where u64: std::convert::From<<T as std::iter::Iterator>::Item>` bound
48   = note: required by `std::convert::From::from`
49
50error[E0277]: the trait bound `Misc<_>: std::convert::From<T>` is not satisfied
51  --> $DIR/trait-suggest-where-clause.rs:25:5
52   |
53LL |     <Misc<_> as From<T>>::from;
54   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `Misc<_>`
55   |
56   = note: required by `std::convert::From::from`
57
58error[E0277]: the size for values of type `[T]` cannot be known at compilation time
59  --> $DIR/trait-suggest-where-clause.rs:30:20
60   |
61LL |     mem::size_of::<[T]>();
62   |                    ^^^ doesn't have a size known at compile-time
63   | 
64  ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
65   |
66LL | pub const fn size_of<T>() -> usize {
67   |                      - required by this bound in `std::mem::size_of`
68   |
69   = help: the trait `std::marker::Sized` is not implemented for `[T]`
70   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
71
72error[E0277]: the size for values of type `[&U]` cannot be known at compilation time
73  --> $DIR/trait-suggest-where-clause.rs:33:5
74   |
75LL |     mem::size_of::<[&U]>();
76   |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
77   | 
78  ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
79   |
80LL | pub const fn size_of<T>() -> usize {
81   |                      - required by this bound in `std::mem::size_of`
82   |
83   = help: the trait `std::marker::Sized` is not implemented for `[&U]`
84   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
85
86error: aborting due to 7 previous errors
87
88For more information about this error, try `rustc --explain E0277`.