fork/rust

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

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

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