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 = 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
11 LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
14 error[E0277]: `T` doesn't implement `std::fmt::Debug`
15 --> $DIR/bound-suggestions.rs:11:22
17 LL | println!("{:?}", t);
18 | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
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`
24 LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
27 error[E0277]: `T` doesn't implement `std::fmt::Debug`
28 --> $DIR/bound-suggestions.rs:17:22
30 LL | println!("{:?}", t);
31 | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
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
37 LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
40 error[E0277]: `Y` doesn't implement `std::fmt::Debug`
41 --> $DIR/bound-suggestions.rs:23:30
43 LL | println!("{:?} {:?}", x, y);
44 | ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
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`
50 LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
51 | ^^^^^^^^^^^^^^^^^^^^
53 error[E0277]: `X` doesn't implement `std::fmt::Debug`
54 --> $DIR/bound-suggestions.rs:29:22
56 LL | println!("{:?}", x);
57 | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
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
63 LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
66 error[E0277]: `X` doesn't implement `std::fmt::Debug`
67 --> $DIR/bound-suggestions.rs:35:22
69 LL | println!("{:?}", x);
70 | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
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`
76 LL | fn test_many_bounds_where<X>(x: X) where X: Sized, X: Sized, X: std::fmt::Debug {
77 | ^^^^^^^^^^^^^^^^^^^^
79 error: aborting due to 6 previous errors
81 For more information about this error, try `rustc --explain E0277`.