Refutability
A pattern which matches all values of its type is irrefutable while one which only matches conditionally is irrefutable.
For example, a pattern unpacking a tuple is irrefutable because all values of type (T, Y)
will
match (a, b)
let tuple: (T, Y) = ...;
match tuple {
(a, b) => {...}
}
while one which matches an enum variant is refutable because the None
option will
not match
match x {
Some(x) => {...}
...
}