Given
fn foo(b: bool, x: Option<u32>) {
if b && if let Some(x) = x {}
}
fn main() {
if true && if true { true }
}
the current output is
error: expected `{`, found `}`
--> src/main.rs:3:1
|
3 | }
| ^ expected `{`
|
note: the `if` expression is missing a block after this condition
--> src/main.rs:2:8
|
2 | if b && if let Some(x) = x {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: expected `{`, found `}`
--> src/main.rs:6:1
|
6 | }
| ^ expected `{`
|
note: the `if` expression is missing a block after this condition
--> src/main.rs:5:8
|
5 | if true && if true { true }
| ^^^^^^^^^^^^^^^^^^^^^^^^
We should detect that what was intended was
fn foo(b: bool, x: Option<u32>) {
if b && let Some(x) = x {}
}
fn main() {
if true && true { true }
}
#53667 (comment)
Given
the current output is
We should detect that what was intended was
#53667 (comment)