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