diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index 7663d211d2..4964ddc7d6 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs @@ -271,6 +271,34 @@ mod tests { ); } + #[test] + fn partial_fill_option() { + check_assist( + fill_match_arms, + r#" +enum Option { Some(T), None } +use Option::*; + +fn main() { + match None$0 { + None => {} + } +} + "#, + r#" +enum Option { Some(T), None } +use Option::*; + +fn main() { + match None { + None => {} + Some(${0:_}) => {} + } +} + "#, + ); + } + #[test] fn partial_fill_or_pat() { check_assist(