aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/fill_match_arms.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/fill_match_arms.rs')
-rw-r--r--crates/ra_assists/src/fill_match_arms.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/fill_match_arms.rs b/crates/ra_assists/src/fill_match_arms.rs
index a7de6ae9f..c7a8bce20 100644
--- a/crates/ra_assists/src/fill_match_arms.rs
+++ b/crates/ra_assists/src/fill_match_arms.rs
@@ -22,7 +22,7 @@ pub(crate) fn fill_match_arms(mut ctx: AssistCtx<impl HirDatabase>) -> Option<As
22 let expr = match_expr.expr()?; 22 let expr = match_expr.expr()?;
23 let analyzer = hir::SourceAnalyzer::new(ctx.db, ctx.frange.file_id, expr.syntax(), None); 23 let analyzer = hir::SourceAnalyzer::new(ctx.db, ctx.frange.file_id, expr.syntax(), None);
24 let match_expr_ty = analyzer.type_of(ctx.db, expr)?; 24 let match_expr_ty = analyzer.type_of(ctx.db, expr)?;
25 let enum_def = match_expr_ty.autoderef(ctx.db).find_map(|ty| match ty.as_adt() { 25 let enum_def = analyzer.autoderef(ctx.db, match_expr_ty).find_map(|ty| match ty.as_adt() {
26 Some((AdtDef::Enum(e), _)) => Some(e), 26 Some((AdtDef::Enum(e), _)) => Some(e),
27 _ => None, 27 _ => None,
28 })?; 28 })?;