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