From 98181087984157e27faba0b969e384f3c62c39d5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 20:09:09 +0200 Subject: Rename BindPat -> IdentPat --- crates/ra_assists/src/handlers/add_explicit_type.rs | 2 +- crates/ra_assists/src/handlers/fill_match_arms.rs | 2 +- crates/ra_assists/src/handlers/inline_local_variable.rs | 2 +- crates/ra_assists/src/handlers/reorder_fields.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_assists') diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs index d8b0af0f5..135a2ac9c 100644 --- a/crates/ra_assists/src/handlers/add_explicit_type.rs +++ b/crates/ra_assists/src/handlers/add_explicit_type.rs @@ -27,7 +27,7 @@ pub(crate) fn add_explicit_type(acc: &mut Assists, ctx: &AssistContext) -> Optio let expr = let_stmt.initializer()?; // Must be a binding let pat = match let_stmt.pat()? { - ast::Pat::BindPat(bind_pat) => bind_pat, + ast::Pat::IdentPat(bind_pat) => bind_pat, _ => return None, }; let pat_range = pat.syntax().text_range(); diff --git a/crates/ra_assists/src/handlers/fill_match_arms.rs b/crates/ra_assists/src/handlers/fill_match_arms.rs index 36658f104..b2e14f9d7 100644 --- a/crates/ra_assists/src/handlers/fill_match_arms.rs +++ b/crates/ra_assists/src/handlers/fill_match_arms.rs @@ -150,7 +150,7 @@ fn does_pat_match_variant(pat: &Pat, var: &Pat) -> bool { let first_node_text = |pat: &Pat| pat.syntax().first_child().map(|node| node.text()); let pat_head = match pat { - Pat::BindPat(bind_pat) => { + Pat::IdentPat(bind_pat) => { if let Some(p) = bind_pat.pat() { first_node_text(&p) } else { diff --git a/crates/ra_assists/src/handlers/inline_local_variable.rs b/crates/ra_assists/src/handlers/inline_local_variable.rs index 2fdfabaf5..3c58020f8 100644 --- a/crates/ra_assists/src/handlers/inline_local_variable.rs +++ b/crates/ra_assists/src/handlers/inline_local_variable.rs @@ -29,7 +29,7 @@ use crate::{ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { let let_stmt = ctx.find_node_at_offset::()?; let bind_pat = match let_stmt.pat()? { - ast::Pat::BindPat(pat) => pat, + ast::Pat::IdentPat(pat) => pat, _ => return None, }; if bind_pat.mut_token().is_some() { diff --git a/crates/ra_assists/src/handlers/reorder_fields.rs b/crates/ra_assists/src/handlers/reorder_fields.rs index 6a19a4002..c9b743a06 100644 --- a/crates/ra_assists/src/handlers/reorder_fields.rs +++ b/crates/ra_assists/src/handlers/reorder_fields.rs @@ -57,7 +57,7 @@ fn reorder(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { fn get_fields_kind(node: &SyntaxNode) -> Vec { match node.kind() { RECORD_EXPR => vec![RECORD_EXPR_FIELD], - RECORD_PAT => vec![RECORD_PAT_FIELD, BIND_PAT], + RECORD_PAT => vec![RECORD_PAT_FIELD, IDENT_PAT], _ => vec![], } } -- cgit v1.2.3