fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.8 KiB53 linesraw
1error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display`
2  --> $DIR/format-args-argument-span.rs:13:21
3   |
4LL |     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
11error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display`
12  --> $DIR/format-args-argument-span.rs:15:37
13   |
14LL |     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
21error[E0277]: `DisplayOnly` doesn't implement `Debug`
22  --> $DIR/format-args-argument-span.rs:18:19
23   |
24LL |     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)
30help: consider annotating `DisplayOnly` with `#[derive(Debug)]`
31   |
32LL + #[derive(Debug)]
33LL | struct DisplayOnly;
34   |
35
36error[E0277]: `DisplayOnly` doesn't implement `Debug`
37  --> $DIR/format-args-argument-span.rs:20:35
38   |
39LL |     println!("{x} {x:?} {x}", x = DisplayOnly);
40   |                                   ^^^^^^^^^^^ `DisplayOnly` cannot be formatted using `{:?}`
41   |
42   = help: the trait `Debug` is not implemented for `DisplayOnly`
43   = note: add `#[derive(Debug)]` to `DisplayOnly` or manually `impl Debug for DisplayOnly`
44   = 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)
45help: consider annotating `DisplayOnly` with `#[derive(Debug)]`
46   |
47LL + #[derive(Debug)]
48LL | struct DisplayOnly;
49   |
50
51error: aborting due to 4 previous errors
52
53For more information about this error, try `rustc --explain E0277`.