2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2016-08-28 18:16:13 -05:00
|
|
|
fn main () {
|
|
|
|
let x = 4;
|
|
|
|
match x {
|
|
|
|
ref r if *r < 0 => println!("got negative num {} < 0", r),
|
2018-05-28 21:42:11 -05:00
|
|
|
e @ 1 ..= 100 => println!("got number within range [1,100] {}", e),
|
2016-08-28 18:16:13 -05:00
|
|
|
_ => println!("no"),
|
|
|
|
}
|
|
|
|
}
|