Skip to content

Commit

Permalink
Add failing variation of _0 span test
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 15, 2020
1 parent 3891d98 commit 57b4e92
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,21 @@ fn test_macro_rules() {
macro_rules! decl_error {
($variant:ident($value:ident)) => {
#[derive(Debug, Error)]
pub enum Error {
pub enum Error0 {
#[error("{0:?}")]
$variant($value),
}

#[derive(Debug, Error)]
#[error("{0:?}")]
pub enum Error1 {
$variant($value),
}
};
}

decl_error!(Repro(u8));

assert("0", Error::Repro(0));
assert("0", Error0::Repro(0));
assert("0", Error1::Repro(0));
}

0 comments on commit 57b4e92

Please sign in to comment.