2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-22 19:07:56 -05:00
|
|
|
#![feature(box_patterns)]
|
2018-03-02 16:05:54 -06:00
|
|
|
|
|
|
|
const VALUE: usize = 21;
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
match &18 {
|
|
|
|
&(18..=18) => {}
|
|
|
|
_ => { unreachable!(); }
|
|
|
|
}
|
|
|
|
match &21 {
|
|
|
|
&(VALUE..=VALUE) => {}
|
|
|
|
_ => { unreachable!(); }
|
|
|
|
}
|
|
|
|
match Box::new(18) {
|
|
|
|
box (18..=18) => {}
|
|
|
|
_ => { unreachable!(); }
|
|
|
|
}
|
|
|
|
match Box::new(21) {
|
|
|
|
box (VALUE..=VALUE) => {}
|
|
|
|
_ => { unreachable!(); }
|
|
|
|
}
|
|
|
|
}
|