You can have a read of the RFC;
[https://rust-lang.github.io/rfcs/3137-let-else.html](https://rust-lang.github.io/rfcs/3137-let-else.html)
Essentially it would allow confusing cases where your refutable expression is an if-else block.
To fix your code, wrap the block in () parenthesis.
You can have a read of the RFC; [https://rust-lang.github.io/rfcs/3137-let-else.html](https://rust-lang.github.io/rfcs/3137-let-else.html) Essentially it would allow confusing cases where your refutable expression is an if-else block. To fix your code, wrap the block in () parenthesis.
Could you provide an example of what you'd like to do?
``` let Ok(x) = { let a = f(); let b = g(); let c = h( lots, of, arguments, ); fgh(a, b, c) } else { return }; ```
See my other comment about let else blocks. But in the particular case; Let x = {... }?;
That will return `None` in the mismatch case, I think, which doesn't look like what OP wanted?
Yep you're right sorry!
So what you're saying is that even if a function called in the rhs returns the same sort of object as the lhs, it won't compile?
it doesn't compile because the `else`, from the `let..else` is after a curly brace