]> git.proxmox.com Git - rustc.git/blob - src/test/ui/bound-suggestions.stderr
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / ui / bound-suggestions.stderr
1 error[E0277]: `impl Sized` doesn't implement `Debug`
2 --> $DIR/bound-suggestions.rs:9:22
3 |
4 LL | println!("{:?}", t);
5 | ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
6 |
7 = note: required by `std::fmt::Debug::fmt`
8 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
9 help: consider further restricting this bound
10 |
11 LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
12 | ^^^^^^^^^^^^^^^^^
13
14 error[E0277]: `T` doesn't implement `Debug`
15 --> $DIR/bound-suggestions.rs:15:22
16 |
17 LL | println!("{:?}", t);
18 | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
19 |
20 = note: required by `std::fmt::Debug::fmt`
21 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
22 help: consider restricting type parameter `T`
23 |
24 LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
25 | ^^^^^^^^^^^^^^^^^
26
27 error[E0277]: `T` doesn't implement `Debug`
28 --> $DIR/bound-suggestions.rs:21:22
29 |
30 LL | println!("{:?}", t);
31 | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
32 |
33 = note: required by `std::fmt::Debug::fmt`
34 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
35 help: consider further restricting this bound
36 |
37 LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
38 | ^^^^^^^^^^^^^^^^^
39
40 error[E0277]: `Y` doesn't implement `Debug`
41 --> $DIR/bound-suggestions.rs:27:30
42 |
43 LL | println!("{:?} {:?}", x, y);
44 | ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
45 |
46 = note: required by `std::fmt::Debug::fmt`
47 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
48 help: consider further restricting type parameter `Y`
49 |
50 LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
51 | ^^^^^^^^^^^^^^^^^^^^
52
53 error[E0277]: `X` doesn't implement `Debug`
54 --> $DIR/bound-suggestions.rs:33:22
55 |
56 LL | println!("{:?}", x);
57 | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
58 |
59 = note: required by `std::fmt::Debug::fmt`
60 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
61 help: consider further restricting this bound
62 |
63 LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
64 | ^^^^^^^^^^^^^^^^^
65
66 error[E0277]: `X` doesn't implement `Debug`
67 --> $DIR/bound-suggestions.rs:39:22
68 |
69 LL | println!("{:?}", x);
70 | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
71 |
72 = note: required by `std::fmt::Debug::fmt`
73 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
74 help: consider further restricting type parameter `X`
75 |
76 LL | fn test_many_bounds_where<X>(x: X) where X: Sized, X: Sized, X: std::fmt::Debug {
77 | ^^^^^^^^^^^^^^^^^^^^
78
79 error[E0277]: the size for values of type `Self` cannot be known at compilation time
80 --> $DIR/bound-suggestions.rs:44:46
81 |
82 LL | const SIZE: usize = core::mem::size_of::<Self>();
83 | ^^^^ doesn't have a size known at compile-time
84 |
85 ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
86 |
87 LL | pub const fn size_of<T>() -> usize {
88 | - required by this bound in `std::mem::size_of`
89 |
90 help: consider further restricting `Self`
91 |
92 LL | trait Foo<T>: Sized {
93 | ^^^^^^^
94
95 error[E0277]: the size for values of type `Self` cannot be known at compilation time
96 --> $DIR/bound-suggestions.rs:49:46
97 |
98 LL | const SIZE: usize = core::mem::size_of::<Self>();
99 | ^^^^ doesn't have a size known at compile-time
100 |
101 ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
102 |
103 LL | pub const fn size_of<T>() -> usize {
104 | - required by this bound in `std::mem::size_of`
105 |
106 help: consider further restricting `Self`
107 |
108 LL | trait Bar: std::fmt::Display + Sized {
109 | ^^^^^^^
110
111 error[E0277]: the size for values of type `Self` cannot be known at compilation time
112 --> $DIR/bound-suggestions.rs:54:46
113 |
114 LL | const SIZE: usize = core::mem::size_of::<Self>();
115 | ^^^^ doesn't have a size known at compile-time
116 |
117 ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
118 |
119 LL | pub const fn size_of<T>() -> usize {
120 | - required by this bound in `std::mem::size_of`
121 |
122 help: consider further restricting `Self`
123 |
124 LL | trait Baz: Sized where Self: std::fmt::Display {
125 | ^^^^^^^
126
127 error[E0277]: the size for values of type `Self` cannot be known at compilation time
128 --> $DIR/bound-suggestions.rs:59:46
129 |
130 LL | const SIZE: usize = core::mem::size_of::<Self>();
131 | ^^^^ doesn't have a size known at compile-time
132 |
133 ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
134 |
135 LL | pub const fn size_of<T>() -> usize {
136 | - required by this bound in `std::mem::size_of`
137 |
138 help: consider further restricting `Self`
139 |
140 LL | trait Qux<T>: Sized where Self: std::fmt::Display {
141 | ^^^^^^^
142
143 error[E0277]: the size for values of type `Self` cannot be known at compilation time
144 --> $DIR/bound-suggestions.rs:64:46
145 |
146 LL | const SIZE: usize = core::mem::size_of::<Self>();
147 | ^^^^ doesn't have a size known at compile-time
148 |
149 ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
150 |
151 LL | pub const fn size_of<T>() -> usize {
152 | - required by this bound in `std::mem::size_of`
153 |
154 help: consider further restricting `Self`
155 |
156 LL | trait Bat<T>: std::fmt::Display + Sized {
157 | ^^^^^^^
158
159 error: aborting due to 11 previous errors
160
161 For more information about this error, try `rustc --explain E0277`.