パターンには代入される側の変数しか書けないけどガードは自由自在
fn test(b: char) -> bool {
 let a = 'a';
 let d = 'd';
 match b {
  _ if a <= b && b <= d => true,
  _ => false,
 }
}
fn main() {
 assert_eq!(test('b'), true);
 assert_eq!(test('x'), false);
}