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