Skip to content

Commit 0e3ec65

Browse files
committed
Add regression test
1 parent f94c50e commit 0e3ec65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/ui/pattern/usefulness/exhaustive_integer_patterns.rs

+6
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,10 @@ fn main() {
163163
BAR => {} // Not detected as unreachable because `try_eval_bits` fails on `BAR`.
164164
_ => {}
165165
}
166+
167+
// Regression test, see https://github.com/rust-lang/rust/pull/66326#issuecomment-552889933
168+
match &0 {
169+
BAR => {} // ok
170+
_ => {}
171+
}
166172
}

0 commit comments

Comments
 (0)