Tentative tracking issue for the exhaustive_integer_patterns feature, in which integer types may be exhaustively matched over their values. Original RFC thread: rust-lang/rfcs#1550.
#![feature(exhaustive_integer_patterns)]
#![feature(exclusive_range_pattern)]
fn matcher(x: u8) {
match x { // ok -- every value has been accounted for
0 .. 32 => { /* foo */ }
32 => { /* bar */ }
33 ..= 255 => { /* baz */ }
}
}
Tentative tracking issue for the
exhaustive_integer_patternsfeature, in which integer types may be exhaustively matched over their values. Original RFC thread: rust-lang/rfcs#1550.