mutagen icon indicating copy to clipboard operation
mutagen copied to clipboard

cannot parse if let

Open bblum opened this issue 5 years ago • 0 comments

#[mutate]
pub fn if_let() -> bool {
    let x = Some(true);
    if let Some(b) = x {
        b
    } else {
        false
    }
}
error: expected expression, found statement (`let`)
   --> src/test.rs:10:8
    |
167 |     if let Some(b) = x {
    |        ^^^ expected expression
    |
    = note: variable declaration using `let` is a statement

bblum avatar Apr 15 '19 20:04 bblum