// *** before: ***
// | worked at the top level of a pattern only
match value {
Some(1) | Some(2) => println!("few"),
Some(_) => println!("many"),
None => println!("empty"),
}
// *** in version 1.53: ***
match value {
Some(1 | 2) => println!("few"),
Some(_) => println!("many"),
None => println!("empty"),
}
// it works inside let and in arguments too
let Ok(x) | Err(x) = result;