2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `impl Sized` doesn't implement `Debug`
|
|
|
|
--> $DIR/bound-suggestions.rs:9:22
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
|
|
|
LL | println!("{:?}", t);
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-03-13 21:28:14 -05:00
|
|
|
help: consider further restricting this bound
|
|
|
|
|
|
2021-03-30 04:56:39 -05:00
|
|
|
LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++++++++++++
|
2019-12-26 06:43:33 -06:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `T` doesn't implement `Debug`
|
|
|
|
--> $DIR/bound-suggestions.rs:15:22
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
|
|
|
LL | println!("{:?}", t);
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-03-13 21:28:14 -05:00
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
2021-03-30 04:56:39 -05:00
|
|
|
LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++++++++++++
|
2019-12-26 06:43:33 -06:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `T` doesn't implement `Debug`
|
|
|
|
--> $DIR/bound-suggestions.rs:21:22
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
|
|
|
LL | println!("{:?}", t);
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-03-13 21:28:14 -05:00
|
|
|
help: consider further restricting this bound
|
|
|
|
|
|
2021-03-30 04:56:39 -05:00
|
|
|
LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++++++++++++
|
2019-12-26 06:43:33 -06:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `Y` doesn't implement `Debug`
|
|
|
|
--> $DIR/bound-suggestions.rs:27:30
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
|
|
|
LL | println!("{:?} {:?}", x, y);
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-03-13 21:28:14 -05:00
|
|
|
help: consider further restricting type parameter `Y`
|
|
|
|
|
|
2021-03-30 04:56:39 -05:00
|
|
|
LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~
|
2019-12-26 06:43:33 -06:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `X` doesn't implement `Debug`
|
|
|
|
--> $DIR/bound-suggestions.rs:33:22
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
|
|
|
LL | println!("{:?}", x);
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-03-13 21:28:14 -05:00
|
|
|
help: consider further restricting this bound
|
|
|
|
|
|
2021-03-30 04:56:39 -05:00
|
|
|
LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++++++++++++
|
2019-12-26 06:43:33 -06:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `X` doesn't implement `Debug`
|
|
|
|
--> $DIR/bound-suggestions.rs:39:22
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
|
|
|
LL | println!("{:?}", x);
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2022-03-14 09:56:37 -05:00
|
|
|
help: consider further restricting this bound
|
2020-03-13 21:28:14 -05:00
|
|
|
|
|
2022-03-14 09:56:37 -05:00
|
|
|
LL | fn test_many_bounds_where<X>(x: X) where X: Sized + std::fmt::Debug, X: Sized {
|
|
|
|
| +++++++++++++++++
|
2019-12-26 06:43:33 -06:00
|
|
|
|
2021-01-19 14:44:49 -06:00
|
|
|
error[E0277]: the size for values of type `Self` cannot be known at compilation time
|
|
|
|
--> $DIR/bound-suggestions.rs:44:46
|
|
|
|
|
|
|
|
|
LL | const SIZE: usize = core::mem::size_of::<Self>();
|
|
|
|
| ^^^^ doesn't have a size known at compile-time
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `std::mem::size_of`
|
|
|
|
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
|
LL | pub const fn size_of<T>() -> usize {
|
2021-07-31 11:26:55 -05:00
|
|
|
| ^ required by this bound in `std::mem::size_of`
|
2021-01-19 14:44:49 -06:00
|
|
|
help: consider further restricting `Self`
|
|
|
|
|
|
|
|
|
LL | trait Foo<T>: Sized {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `Self` cannot be known at compilation time
|
|
|
|
--> $DIR/bound-suggestions.rs:49:46
|
|
|
|
|
|
|
|
|
LL | const SIZE: usize = core::mem::size_of::<Self>();
|
|
|
|
| ^^^^ doesn't have a size known at compile-time
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `std::mem::size_of`
|
|
|
|
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
|
LL | pub const fn size_of<T>() -> usize {
|
2021-07-31 11:26:55 -05:00
|
|
|
| ^ required by this bound in `std::mem::size_of`
|
2021-01-19 14:44:49 -06:00
|
|
|
help: consider further restricting `Self`
|
|
|
|
|
|
|
|
|
LL | trait Bar: std::fmt::Display + Sized {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `Self` cannot be known at compilation time
|
|
|
|
--> $DIR/bound-suggestions.rs:54:46
|
|
|
|
|
|
|
|
|
LL | const SIZE: usize = core::mem::size_of::<Self>();
|
|
|
|
| ^^^^ doesn't have a size known at compile-time
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `std::mem::size_of`
|
|
|
|
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
|
LL | pub const fn size_of<T>() -> usize {
|
2021-07-31 11:26:55 -05:00
|
|
|
| ^ required by this bound in `std::mem::size_of`
|
2021-01-19 14:44:49 -06:00
|
|
|
help: consider further restricting `Self`
|
|
|
|
|
|
|
|
|
LL | trait Baz: Sized where Self: std::fmt::Display {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `Self` cannot be known at compilation time
|
|
|
|
--> $DIR/bound-suggestions.rs:59:46
|
|
|
|
|
|
|
|
|
LL | const SIZE: usize = core::mem::size_of::<Self>();
|
|
|
|
| ^^^^ doesn't have a size known at compile-time
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `std::mem::size_of`
|
|
|
|
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
|
LL | pub const fn size_of<T>() -> usize {
|
2021-07-31 11:26:55 -05:00
|
|
|
| ^ required by this bound in `std::mem::size_of`
|
2021-01-19 14:44:49 -06:00
|
|
|
help: consider further restricting `Self`
|
|
|
|
|
|
|
|
|
LL | trait Qux<T>: Sized where Self: std::fmt::Display {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `Self` cannot be known at compilation time
|
|
|
|
--> $DIR/bound-suggestions.rs:64:46
|
|
|
|
|
|
|
|
|
LL | const SIZE: usize = core::mem::size_of::<Self>();
|
|
|
|
| ^^^^ doesn't have a size known at compile-time
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `std::mem::size_of`
|
|
|
|
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
|
LL | pub const fn size_of<T>() -> usize {
|
2021-07-31 11:26:55 -05:00
|
|
|
| ^ required by this bound in `std::mem::size_of`
|
2021-01-19 14:44:49 -06:00
|
|
|
help: consider further restricting `Self`
|
|
|
|
|
|
|
|
|
LL | trait Bat<T>: std::fmt::Display + Sized {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++++++
|
2021-01-19 14:44:49 -06:00
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
2019-12-26 06:43:33 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|