Files
rust/tests/ui/pattern/struct-wildcard-pattern-14308.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
283 B
Rust
Raw Normal View History

2025-07-24 17:52:22 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/14308
//@ run-pass
struct A(isize);
fn main() {
let x = match A(3) {
2015-01-25 22:05:03 +01:00
A(..) => 1
};
assert_eq!(x, 1);
let x = match A(4) {
2015-01-25 22:05:03 +01:00
A(1) => 1,
A(..) => 2
};
assert_eq!(x, 2);
}