|
| 1 | +error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display` |
| 2 | + --> $DIR/format-args-argument-span.rs:13:21 |
| 3 | + | |
| 4 | +LL | println!("{x:?} {x} {x:?}"); |
| 5 | + | ^^^ `Option<{integer}>` cannot be formatted with the default formatter |
| 6 | + | |
| 7 | + = help: the trait `std::fmt::Display` is not implemented for `Option<{integer}>` |
| 8 | + = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 9 | + = 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) |
| 10 | + |
| 11 | +error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display` |
| 12 | + --> $DIR/format-args-argument-span.rs:15:37 |
| 13 | + | |
| 14 | +LL | println!("{x:?} {x} {x:?}", x = Some(1)); |
| 15 | + | ^^^^^^^ `Option<{integer}>` cannot be formatted with the default formatter |
| 16 | + | |
| 17 | + = help: the trait `std::fmt::Display` is not implemented for `Option<{integer}>` |
| 18 | + = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead |
| 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 | + |
| 21 | +error[E0277]: `DisplayOnly` doesn't implement `Debug` |
| 22 | + --> $DIR/format-args-argument-span.rs:18:19 |
| 23 | + | |
| 24 | +LL | println!("{x} {x:?} {x}"); |
| 25 | + | ^^^^^ `DisplayOnly` cannot be formatted using `{:?}` |
| 26 | + | |
| 27 | + = help: the trait `Debug` is not implemented for `DisplayOnly` |
| 28 | + = note: add `#[derive(Debug)]` to `DisplayOnly` or manually `impl Debug for DisplayOnly` |
| 29 | + = 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) |
| 30 | +help: consider annotating `DisplayOnly` with `#[derive(Debug)]` |
| 31 | + | |
| 32 | +LL | #[derive(Debug)] |
| 33 | + | |
| 34 | + |
| 35 | +error[E0277]: `DisplayOnly` doesn't implement `Debug` |
| 36 | + --> $DIR/format-args-argument-span.rs:20:35 |
| 37 | + | |
| 38 | +LL | println!("{x} {x:?} {x}", x = DisplayOnly); |
| 39 | + | ^^^^^^^^^^^ `DisplayOnly` cannot be formatted using `{:?}` |
| 40 | + | |
| 41 | + = help: the trait `Debug` is not implemented for `DisplayOnly` |
| 42 | + = note: add `#[derive(Debug)]` to `DisplayOnly` or manually `impl Debug for DisplayOnly` |
| 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 annotating `DisplayOnly` with `#[derive(Debug)]` |
| 45 | + | |
| 46 | +LL | #[derive(Debug)] |
| 47 | + | |
| 48 | + |
| 49 | +error: aborting due to 4 previous errors |
| 50 | + |
| 51 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments