blob: 2bb7defdac710c22fb0ec0cc24d1caa1ded3761a [file] [log] [blame]
error[E0277]: the size for values of type `U` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:8:20
|
LL | fn check<T: Iterator, U: ?Sized>() {
| -- help: consider further restricting this bound: `U: std::marker::Sized +`
LL | // suggest a where-clause, if needed
LL | mem::size_of::<U>();
| ^ doesn't have a size known at compile-time
|
::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
= help: the trait `std::marker::Sized` is not implemented for `U`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
error[E0277]: the size for values of type `U` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:11:5
|
LL | fn check<T: Iterator, U: ?Sized>() {
| -- help: consider further restricting this bound: `U: std::marker::Sized +`
...
LL | mem::size_of::<Misc<U>>();
| ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
= help: within `Misc<U>`, the trait `std::marker::Sized` is not implemented for `U`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required because it appears within the type `Misc<U>`
error[E0277]: the trait bound `u64: std::convert::From<T>` is not satisfied
--> $DIR/trait-suggest-where-clause.rs:16:5
|
LL | <u64 as From<T>>::from;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `u64`
|
= note: required by `std::convert::From::from`
error[E0277]: the trait bound `u64: std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
--> $DIR/trait-suggest-where-clause.rs:19:5
|
LL | <u64 as From<<T as Iterator>::Item>>::from;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<<T as std::iter::Iterator>::Item>` is not implemented for `u64`
|
= note: required by `std::convert::From::from`
error[E0277]: the trait bound `Misc<_>: std::convert::From<T>` is not satisfied
--> $DIR/trait-suggest-where-clause.rs:24:5
|
LL | <Misc<_> as From<T>>::from;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `Misc<_>`
|
= note: required by `std::convert::From::from`
error[E0277]: the size for values of type `[T]` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:29:20
|
LL | mem::size_of::<[T]>();
| ^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
= help: the trait `std::marker::Sized` is not implemented for `[T]`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
error[E0277]: the size for values of type `[&U]` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:32:5
|
LL | mem::size_of::<[&U]>();
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
= help: the trait `std::marker::Sized` is not implemented for `[&U]`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0277`.