From 789efede824c8ae68b34051d8e822bcab4ae4155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 22 Jan 2021 23:15:38 +0100 Subject: [PATCH] Add failing test case --- .../assists/src/handlers/fill_match_arms.rs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index 7663d211d2f..4964ddc7d60 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs @@ -271,6 +271,34 @@ fn main() { ); } + #[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(