From 0a9e3ccc262fbcbd4cdaab30384f8cb71584544b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 16:49:13 +0200 Subject: Rename FieldDef -> Field --- crates/ra_assists/src/handlers/change_visibility.rs | 4 ++-- crates/ra_assists/src/handlers/move_bounds.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_assists/src') diff --git a/crates/ra_assists/src/handlers/change_visibility.rs b/crates/ra_assists/src/handlers/change_visibility.rs index c3e1f2803..72d06d55b 100644 --- a/crates/ra_assists/src/handlers/change_visibility.rs +++ b/crates/ra_assists/src/handlers/change_visibility.rs @@ -47,7 +47,7 @@ fn add_vis(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { } (vis_offset(&parent), keyword.text_range()) } else if let Some(field_name) = ctx.find_node_at_offset::() { - let field = field_name.syntax().ancestors().find_map(ast::RecordFieldDef::cast)?; + let field = field_name.syntax().ancestors().find_map(ast::RecordField::cast)?; if field.name()? != field_name { mark::hit!(change_visibility_field_false_positive); return None; @@ -56,7 +56,7 @@ fn add_vis(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { return None; } (vis_offset(field.syntax()), field_name.syntax().text_range()) - } else if let Some(field) = ctx.find_node_at_offset::() { + } else if let Some(field) = ctx.find_node_at_offset::() { if field.visibility().is_some() { return None; } diff --git a/crates/ra_assists/src/handlers/move_bounds.rs b/crates/ra_assists/src/handlers/move_bounds.rs index 69ce90fbc..15327facb 100644 --- a/crates/ra_assists/src/handlers/move_bounds.rs +++ b/crates/ra_assists/src/handlers/move_bounds.rs @@ -43,7 +43,7 @@ pub(crate) fn move_bounds_to_where_clause(acc: &mut Assists, ctx: &AssistContext ast::EnumDef(it) => it.variant_list()?.syntax().clone().into(), ast::StructDef(it) => { it.syntax().children_with_tokens() - .find(|it| it.kind() == RECORD_FIELD_DEF_LIST || it.kind() == T![;])? + .find(|it| it.kind() == RECORD_FIELD_LIST || it.kind() == T![;])? }, _ => return None } -- cgit v1.2.3