From 28ef4c375a9f56d69daf885504aea3df7012bb81 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 15:36:21 +0200 Subject: Rename TypeParamList -> GenericParamList --- crates/ra_ide/src/display.rs | 4 ++-- crates/ra_ide/src/extend_selection.rs | 2 +- crates/ra_ide/src/file_structure.rs | 4 ++-- crates/ra_ide/src/references.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/display.rs b/crates/ra_ide/src/display.rs index 6d93726bf..e81e8436f 100644 --- a/crates/ra_ide/src/display.rs +++ b/crates/ra_ide/src/display.rs @@ -5,7 +5,7 @@ mod navigation_target; mod short_label; use ra_syntax::{ - ast::{self, AstNode, AttrsOwner, NameOwner, TypeParamsOwner}, + ast::{self, AstNode, AttrsOwner, GenericParamsOwner, NameOwner}, SyntaxKind::{ATTR, COMMENT}, }; @@ -37,7 +37,7 @@ pub(crate) fn function_declaration(node: &ast::Fn) -> String { if let Some(name) = node.name() { format_to!(buf, "fn {}", name) } - if let Some(type_params) = node.type_param_list() { + if let Some(type_params) = node.generic_param_list() { format_to!(buf, "{}", type_params); } if let Some(param_list) = node.param_list() { diff --git a/crates/ra_ide/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs index 8a6b3ea99..b1c4561c1 100644 --- a/crates/ra_ide/src/extend_selection.rs +++ b/crates/ra_ide/src/extend_selection.rs @@ -44,7 +44,7 @@ fn try_extend_selection( RECORD_FIELD_LIST, ENUM_VARIANT_LIST, USE_TREE_LIST, - TYPE_PARAM_LIST, + GENERIC_PARAM_LIST, TYPE_ARG_LIST, TYPE_BOUND_LIST, PARAM_LIST, diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs index 8ef977761..05ccc0b73 100644 --- a/crates/ra_ide/src/file_structure.rs +++ b/crates/ra_ide/src/file_structure.rs @@ -1,5 +1,5 @@ use ra_syntax::{ - ast::{self, AttrsOwner, NameOwner, TypeAscriptionOwner, TypeParamsOwner}, + ast::{self, AttrsOwner, GenericParamsOwner, NameOwner, TypeAscriptionOwner}, match_ast, AstNode, SourceFile, SyntaxKind, SyntaxNode, TextRange, WalkEvent, }; @@ -113,7 +113,7 @@ fn structure_node(node: &SyntaxNode) -> Option { match node { ast::Fn(it) => { let mut detail = String::from("fn"); - if let Some(type_param_list) = it.type_param_list() { + if let Some(type_param_list) = it.generic_param_list() { collapse_ws(type_param_list.syntax(), &mut detail); } if let Some(param_list) = it.param_list() { diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index 8d3452a83..94d03a07f 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs @@ -175,7 +175,7 @@ fn get_struct_def_name_for_struct_literal_search( return name.syntax().ancestors().find_map(ast::StructDef::cast).and_then(|l| l.name()); } if sema - .find_node_at_offset_with_descend::( + .find_node_at_offset_with_descend::( &syntax, left.text_range().start(), ) -- cgit v1.2.3