1 error[E0277]: `impl Sized` doesn't implement `Debug`
2 --> $DIR/bound-suggestions.rs:9:22
4 LL | println!("{:?}", t);
5 | ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
7 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
8 help: consider further restricting this bound
10 LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
13 error[E0277]: `T` doesn't implement `Debug`
14 --> $DIR/bound-suggestions.rs:15:22
16 LL | println!("{:?}", t);
17 | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
19 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
20 help: consider restricting type parameter `T`
22 LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
25 error[E0277]: `T` doesn't implement `Debug`
26 --> $DIR/bound-suggestions.rs:21:22
28 LL | println!("{:?}", t);
29 | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
31 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
32 help: consider further restricting this bound
34 LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
37 error[E0277]: `Y` doesn't implement `Debug`
38 --> $DIR/bound-suggestions.rs:27:30
40 LL | println!("{:?} {:?}", x, y);
41 | ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
43 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
44 help: consider further restricting type parameter `Y`
46 LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
47 | ~~~~~~~~~~~~~~~~~~~~
49 error[E0277]: `X` doesn't implement `Debug`
50 --> $DIR/bound-suggestions.rs:33:22
52 LL | println!("{:?}", x);
53 | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
55 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
56 help: consider further restricting this bound
58 LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
61 error[E0277]: `X` doesn't implement `Debug`
62 --> $DIR/bound-suggestions.rs:39:22
64 LL | println!("{:?}", x);
65 | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
67 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
68 help: consider further restricting this bound
70 LL | fn test_many_bounds_where<X>(x: X) where X: Sized + std::fmt::Debug, X: Sized {
73 error[E0277]: the size for values of type `Self` cannot be known at compilation time
74 --> $DIR/bound-suggestions.rs:44:46
76 LL | const SIZE: usize = core::mem::size_of::<Self>();
77 | ^^^^ doesn't have a size known at compile-time
79 note: required by a bound in `std::mem::size_of`
80 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
81 help: consider further restricting `Self`
83 LL | trait Foo<T>: Sized {
86 error[E0277]: the size for values of type `Self` cannot be known at compilation time
87 --> $DIR/bound-suggestions.rs:49:46
89 LL | const SIZE: usize = core::mem::size_of::<Self>();
90 | ^^^^ doesn't have a size known at compile-time
92 note: required by a bound in `std::mem::size_of`
93 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
94 help: consider further restricting `Self`
96 LL | trait Bar: std::fmt::Display + Sized {
99 error[E0277]: the size for values of type `Self` cannot be known at compilation time
100 --> $DIR/bound-suggestions.rs:54:46
102 LL | const SIZE: usize = core::mem::size_of::<Self>();
103 | ^^^^ doesn't have a size known at compile-time
105 note: required by a bound in `std::mem::size_of`
106 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
107 help: consider further restricting `Self`
109 LL | trait Baz: Sized where Self: std::fmt::Display {
112 error[E0277]: the size for values of type `Self` cannot be known at compilation time
113 --> $DIR/bound-suggestions.rs:59:46
115 LL | const SIZE: usize = core::mem::size_of::<Self>();
116 | ^^^^ doesn't have a size known at compile-time
118 note: required by a bound in `std::mem::size_of`
119 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
120 help: consider further restricting `Self`
122 LL | trait Qux<T>: Sized where Self: std::fmt::Display {
125 error[E0277]: the size for values of type `Self` cannot be known at compilation time
126 --> $DIR/bound-suggestions.rs:64:46
128 LL | const SIZE: usize = core::mem::size_of::<Self>();
129 | ^^^^ doesn't have a size known at compile-time
131 note: required by a bound in `std::mem::size_of`
132 --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
133 help: consider further restricting `Self`
135 LL | trait Bat<T>: std::fmt::Display + Sized {
138 error: aborting due to 11 previous errors
140 For more information about this error, try `rustc --explain E0277`.