enum Option { Some(i64), None } fn main() -> i64 { let s = Option::Some(42); let n = Option::None; // if let: 匹配 Some if let Option::Some = s { print_i64(100); } else { print_i64(0); } // if let: 匹配 None(走 else) if let Option::Some = n { print_i64(999); } else { print_i64(200); } return 0; }