| error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display` | |
| --> $DIR/format-args-argument-span.rs:13:21 | |
| | | |
| LL | println!("{x:?} {x} {x:?}"); | |
| | ^^^ `Option<{integer}>` cannot be formatted with the default formatter | |
| | | |
| = help: the trait `std::fmt::Display` is not implemented for `Option<{integer}>` | |
| = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead | |
| error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display` | |
| --> $DIR/format-args-argument-span.rs:15:37 | |
| | | |
| LL | println!("{x:?} {x} {x:?}", x = Some(1)); | |
| | --- ^^^^^^^ `Option<{integer}>` cannot be formatted with the default formatter | |
| | | | |
| | required by this formatting parameter | |
| | | |
| = help: the trait `std::fmt::Display` is not implemented for `Option<{integer}>` | |
| = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead | |
| error[E0277]: `DisplayOnly` doesn't implement `Debug` | |
| --> $DIR/format-args-argument-span.rs:18:19 | |
| | | |
| LL | println!("{x} {x:?} {x}"); | |
| | ^^^^^ `DisplayOnly` cannot be formatted using `{:?}` because it doesn't implement `Debug` | |
| | | |
| = help: the trait `Debug` is not implemented for `DisplayOnly` | |
| help: consider annotating `DisplayOnly` with `#[derive(Debug)]` | |
| | | |
| LL + #[derive(Debug)] | |
| LL | struct DisplayOnly; | |
| | | |
| error[E0277]: `DisplayOnly` doesn't implement `Debug` | |
| --> $DIR/format-args-argument-span.rs:20:35 | |
| | | |
| LL | println!("{x} {x:?} {x}", x = DisplayOnly); | |
| | ----- ^^^^^^^^^^^ `DisplayOnly` cannot be formatted using `{:?}` because it doesn't implement `Debug` | |
| | | | |
| | required by this formatting parameter | |
| | | |
| = help: the trait `Debug` is not implemented for `DisplayOnly` | |
| help: consider annotating `DisplayOnly` with `#[derive(Debug)]` | |
| | | |
| LL + #[derive(Debug)] | |
| LL | struct DisplayOnly; | |
| | | |
| error: aborting due to 4 previous errors | |
| For more information about this error, try `rustc --explain E0277`. |