可以。 根据Rust参考手册: fn main() { let x = false || true; // true let y = false && panic!(); // false, doesn't evaluate `panic!()` }
|
和&
。 - Sven Marnach