2020-01-23 00:00:00 +00:00
|
|
|
// check-pass
|
2018-05-29 02:32:03 +00:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
#![warn(ellipsis_inclusive_range_patterns)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let despondency = 2;
|
|
|
|
match despondency {
|
|
|
|
1...2 => {}
|
|
|
|
//~^ WARN `...` range patterns are deprecated
|
2021-06-15 15:16:21 +00:00
|
|
|
//~| WARN this is valid in the current edition
|
2018-05-29 02:32:03 +00:00
|
|
|
_ => {}
|
|
|
|
}
|
2018-11-10 18:08:50 +00:00
|
|
|
|
|
|
|
match &despondency {
|
|
|
|
&1...2 => {}
|
|
|
|
//~^ WARN `...` range patterns are deprecated
|
2021-06-15 15:16:21 +00:00
|
|
|
//~| WARN this is valid in the current edition
|
2018-11-10 18:08:50 +00:00
|
|
|
_ => {}
|
|
|
|
}
|
2018-05-29 02:32:03 +00:00
|
|
|
}
|