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.

21 lines
297 B
Rust
Raw Normal View History

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