rust/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs
Ding Xiang Fei e5453b4806
lower ExprKind::Use, LogicalOp::Or and UnOp::Not
Co-authored-by: Abdulaziz Ghuloum <aghuloum@gmail.com>
2023-08-30 17:24:10 +08:00

19 lines
255 B
Rust

fn and_chain() {
let z;
if true && { z = 3; true} && z == 3 {}
}
fn and_chain_2() {
let z;
true && { z = 3; true} && z == 3;
//~^ ERROR E0381
}
fn or_chain() {
let z;
if false || { z = 3; false} || z == 3 {}
}
fn main() {
}