Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Nov 12, 2019
1 parent f94c50e commit 0e3ec65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/ui/pattern/usefulness/exhaustive_integer_patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,10 @@ fn main() {
BAR => {} // Not detected as unreachable because `try_eval_bits` fails on `BAR`.
_ => {}
}

// Regression test, see https://github.com/rust-lang/rust/pull/66326#issuecomment-552889933
match &0 {
BAR => {} // ok
_ => {}
}
}

0 comments on commit 0e3ec65

Please sign in to comment.