rust/tests/ui/rfcs/rfc-2497-if-let-chains/chains-without-let.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
250 B
Rust
Raw Normal View History

//@ check-pass
2022-01-18 16:38:17 -06:00
fn and_chain() {
let z;
if true && { z = 3; true} && z == 3 {}
}
fn and_chain_2() {
let z;
true && { z = 3; true} && z == 3;
}
fn or_chain() {
let z;
if false || { z = 3; false} || z == 3 {}
}
fn main() {
}