Description
struct MyError;
impl std::error::Error for MyError {}
$ cargo +nightly-2020-04-19 check
error[E0277]: `MyError` doesn't implement `std::fmt::Display`
--> src/main.rs:2:6
|
2 | impl std::error::Error for MyError {}
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `MyError`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
$ cargo +nightly-2020-04-20 check
error[E0277]: `MyError` doesn't implement `std::fmt::Display`
--> src/main.rs:2:6
|
2 | impl std::error::Error for MyError {}
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `MyError`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
Notice the extra one column of indentation in front of the pipes. I presume this is unintentional because almost any other error is still printed without such extra indentation; for example:
error: expected one of `!`, `(`, `+`, `::`, `<`, `where`, or `{`, found `;`
--> src/main.rs:2:35
|
2 | impl std::error::Error for MyError;
| ^ expected one of 7 possible tokens
The relevant commit range is 52fa23a...dbf8b6b.
Mentioning @estebank @eddyb because #69745 looks like it touches error messages vaguely along the same lines.