From 8d588efc2b75a886af642b14b0d3ee87d497a20e Mon Sep 17 00:00:00 2001 From: Dawer <7803845+iDawer@users.noreply.github.com> Date: Sun, 18 Apr 2021 20:17:30 +0500 Subject: Return to the status quo in #8129 --- crates/ide_assists/src/handlers/fill_match_arms.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ide_assists/src/handlers') diff --git a/crates/ide_assists/src/handlers/fill_match_arms.rs b/crates/ide_assists/src/handlers/fill_match_arms.rs index 800ce972c..3047f91d8 100644 --- a/crates/ide_assists/src/handlers/fill_match_arms.rs +++ b/crates/ide_assists/src/handlers/fill_match_arms.rs @@ -57,6 +57,8 @@ pub(crate) fn fill_match_arms(acc: &mut Assists, ctx: &AssistContext) -> Option< Pat::OrPat(or_pat) => Either::Left(or_pat.pats()), _ => Either::Right(iter::once(pat)), }) + // Exclude top level wildcards so that they are expanded by this assist, retains status quo in #8129. + .filter(|pat| !matches!(pat, Pat::WildcardPat(_))) .collect(); let module = ctx.sema.scope(expr.syntax()).module()?; -- cgit v1.2.3