-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-assistsA-patternpattern handling related thingspattern handling related thingsC-featureCategory: feature requestCategory: feature requestS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
Currently, for code like
let (x, y) = match Some((0, 1)) {
Some(it) => it,
None => todo!(),
};
The "Convert match to let-else" assist doesn't trigger, because it only works with identifier patterns, but here we have (x, y)
as the pattern. This is a pretty arbitrary limitation, and the assist should be able to turn it into:
let Some((x,y)) = Some((0, 1)) else { todo!() };
Metadata
Metadata
Assignees
Labels
A-assistsA-patternpattern handling related thingspattern handling related thingsC-featureCategory: feature requestCategory: feature requestS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now