fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
4.1 KiB93 linesraw
1error[E0277]: `impl Sized` doesn't implement `std::fmt::Debug`
2  --> $DIR/bound-suggestions.rs:5:22
3   |
4LL |     println!("{:?}", t);
5   |                      ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
6   |
7   = help: the trait `std::fmt::Debug` is not implemented for `impl Sized`
8help: consider further restricting this bound with `+ std::fmt::Debug`
9  --> $DIR/bound-suggestions.rs:4:17
10   |
11LL | fn test_impl(t: impl Sized) {
12   |                 ^^^^^^^^^^
13   = note: required by `std::fmt::Debug::fmt`
14   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
15
16error[E0277]: `T` doesn't implement `std::fmt::Debug`
17  --> $DIR/bound-suggestions.rs:11:22
18   |
19LL |     println!("{:?}", t);
20   |                      ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
21   |
22   = help: the trait `std::fmt::Debug` is not implemented for `T`
23help: consider restricting this type parameter with `T: std::fmt::Debug`
24  --> $DIR/bound-suggestions.rs:10:19
25   |
26LL | fn test_no_bounds<T>(t: T) {
27   |                   ^
28   = note: required by `std::fmt::Debug::fmt`
29   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
30
31error[E0277]: `T` doesn't implement `std::fmt::Debug`
32  --> $DIR/bound-suggestions.rs:17:22
33   |
34LL |     println!("{:?}", t);
35   |                      ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
36   |
37   = help: the trait `std::fmt::Debug` is not implemented for `T`
38help: consider further restricting this bound with `+ std::fmt::Debug`
39  --> $DIR/bound-suggestions.rs:16:22
40   |
41LL | fn test_one_bound<T: Sized>(t: T) {
42   |                      ^^^^^
43   = note: required by `std::fmt::Debug::fmt`
44   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
45
46error[E0277]: `Y` doesn't implement `std::fmt::Debug`
47  --> $DIR/bound-suggestions.rs:23:30
48   |
49LL |     println!("{:?} {:?}", x, y);
50   |                              ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
51   |
52   = help: the trait `std::fmt::Debug` is not implemented for `Y`
53help: consider restricting this type parameter with `where Y: std::fmt::Debug`
54  --> $DIR/bound-suggestions.rs:22:28
55   |
56LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug {
57   |                            ^
58   = note: required by `std::fmt::Debug::fmt`
59   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
60
61error[E0277]: `X` doesn't implement `std::fmt::Debug`
62  --> $DIR/bound-suggestions.rs:29:22
63   |
64LL |     println!("{:?}", x);
65   |                      ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
66   |
67   = help: the trait `std::fmt::Debug` is not implemented for `X`
68help: consider further restricting this bound with `+ std::fmt::Debug`
69  --> $DIR/bound-suggestions.rs:28:40
70   |
71LL | fn test_one_bound_where<X>(x: X) where X: Sized {
72   |                                        ^^^^^^^^
73   = note: required by `std::fmt::Debug::fmt`
74   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
75
76error[E0277]: `X` doesn't implement `std::fmt::Debug`
77  --> $DIR/bound-suggestions.rs:35:22
78   |
79LL |     println!("{:?}", x);
80   |                      ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
81   |
82   = help: the trait `std::fmt::Debug` is not implemented for `X`
83help: consider further restricting this type parameter with `where X: std::fmt::Debug`
84  --> $DIR/bound-suggestions.rs:34:27
85   |
86LL | fn test_many_bounds_where<X>(x: X) where X: Sized, X: Sized {
87   |                           ^
88   = note: required by `std::fmt::Debug::fmt`
89   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
90
91error: aborting due to 6 previous errors
92
93For more information about this error, try `rustc --explain E0277`.