-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #263 from dtolnay/missingdisplay
Restore UI test involving missing Display impl
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use thiserror::Error; | ||
|
||
#[derive(Error, Debug)] | ||
pub enum MyError { | ||
First, | ||
Second, | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error[E0277]: `MyError` doesn't implement `std::fmt::Display` | ||
--> tests/ui/missing-display.rs:4:10 | ||
| | ||
4 | pub enum 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 | ||
note: required by a bound in `std::error::Error` | ||
--> $RUST/core/src/error.rs | ||
| | ||
| pub trait Error: Debug + Display { | ||
| ^^^^^^^ required by this bound in `Error` |