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.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_assists/src/fill_match_arms.rs b/crates/ra_assists/src/fill_match_arms.rs
index 45e327cd4..a7de6ae9f 100644
--- a/crates/ra_assists/src/fill_match_arms.rs
+++ b/crates/ra_assists/src/fill_match_arms.rs
@@ -1,7 +1,7 @@
1use std::fmt::Write; 1use std::fmt::Write;
2 2
3use hir::{ 3use hir::{
4 AdtDef, FieldSource, 4 AdtDef, FieldSource, HasSource,
5 db::HirDatabase, 5 db::HirDatabase,
6}; 6};
7use ra_syntax::ast::{self, AstNode}; 7use ra_syntax::ast::{self, AstNode};
@@ -44,8 +44,8 @@ pub(crate) fn fill_match_arms(mut ctx: AssistCtx<impl HirDatabase>) -> Option<As
44 .into_iter() 44 .into_iter()
45 .map(|field| { 45 .map(|field| {
46 let name = field.name(db).to_string(); 46 let name = field.name(db).to_string();
47 let (_, source) = field.source(db); 47 let src = field.source(db);
48 match source { 48 match src.ast {
49 FieldSource::Named(_) => name, 49 FieldSource::Named(_) => name,
50 FieldSource::Pos(_) => "_".to_string(), 50 FieldSource::Pos(_) => "_".to_string(),
51 } 51 }