diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 14:36:21 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 14:36:21 +0100 |
commit | 28ef4c375a9f56d69daf885504aea3df7012bb81 (patch) | |
tree | 5118a120ce8ff2b58e170415a07d0a089034fd6d /crates/ra_assists/src/handlers/generate_new.rs | |
parent | eb2f8063444b11257111f4f8ade990ec810e0361 (diff) |
Rename TypeParamList -> GenericParamList
Diffstat (limited to 'crates/ra_assists/src/handlers/generate_new.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/generate_new.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/generate_new.rs b/crates/ra_assists/src/handlers/generate_new.rs index 4dff0ae4d..340f9b103 100644 --- a/crates/ra_assists/src/handlers/generate_new.rs +++ b/crates/ra_assists/src/handlers/generate_new.rs | |||
@@ -1,7 +1,8 @@ | |||
1 | use hir::Adt; | 1 | use hir::Adt; |
2 | use ra_syntax::{ | 2 | use ra_syntax::{ |
3 | ast::{ | 3 | ast::{ |
4 | self, AstNode, NameOwner, StructKind, TypeAscriptionOwner, TypeParamsOwner, VisibilityOwner, | 4 | self, AstNode, GenericParamsOwner, NameOwner, StructKind, TypeAscriptionOwner, |
5 | VisibilityOwner, | ||
5 | }, | 6 | }, |
6 | T, | 7 | T, |
7 | }; | 8 | }; |
@@ -91,7 +92,7 @@ pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
91 | // Generates the surrounding `impl Type { <code> }` including type and lifetime | 92 | // Generates the surrounding `impl Type { <code> }` including type and lifetime |
92 | // parameters | 93 | // parameters |
93 | fn generate_impl_text(strukt: &ast::StructDef, code: &str) -> String { | 94 | fn generate_impl_text(strukt: &ast::StructDef, code: &str) -> String { |
94 | let type_params = strukt.type_param_list(); | 95 | let type_params = strukt.generic_param_list(); |
95 | let mut buf = String::with_capacity(code.len()); | 96 | let mut buf = String::with_capacity(code.len()); |
96 | buf.push_str("\n\nimpl"); | 97 | buf.push_str("\n\nimpl"); |
97 | if let Some(type_params) = &type_params { | 98 | if let Some(type_params) = &type_params { |