fn main() { let x = Some(5); match x { Some(i) if i > 0 => println!("正数: {}", i), Some(i) => println!("非正数: {}", i), None => println!("没有值"), } }