2019-05-15 08:16:04 -05:00
|
|
|
// run-pass
|
|
|
|
|
|
|
|
#![allow(irrefutable_let_patterns)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x: bool;
|
|
|
|
// This should associate as: `(x = (true && false));`.
|
|
|
|
x = true && false;
|
|
|
|
assert!(!x);
|
|
|
|
|
|
|
|
fn _f1() -> bool {
|
|
|
|
// Should associate as `(let _ = (return (true && false)))`.
|
2021-08-08 09:49:13 -05:00
|
|
|
if let _ = return true && false {};
|
|
|
|
//~^ WARNING unreachable block in `if`
|
2019-05-15 08:16:04 -05:00
|
|
|
}
|
|
|
|
assert!(!_f1());
|
|
|
|
}
|