rust/src/test/ui/pattern/usefulness/issue-15129.rs

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

18 lines
312 B
Rust
Raw Normal View History

pub enum T {
T1(()),
2020-12-16 18:42:49 -06:00
T2(()),
}
pub enum V {
V1(isize),
2020-12-16 18:42:49 -06:00
V2(bool),
}
fn main() {
match (T::T1(()), V::V2(true)) {
//~^ ERROR non-exhaustive patterns: `(T1(()), V2(_))` and `(T2(()), V1(_))` not covered
(T::T1(()), V::V1(i)) => (),
2020-12-16 18:42:49 -06:00
(T::T2(()), V::V2(b)) => (),
}
}