-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
(let-else will be stable in about 6 weeks from now (Rust 1.65); we should probably not ship this assist before then)
It would be nice to have an assist to rewrite let statements with a match like the following, to their corresponding let-else form:
let val = match opt {
Some(it) => it,
None => return,
};->
let Some(val) = opt else { return };Criteria for the assist should be:
letstatement whose initializer is amatchexpressionmatchhas 2 arms, the first extracts data, the second has a diverging expression
unexge