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