aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers/add_new.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/handlers/add_new.rs')
-rw-r--r--crates/ra_assists/src/handlers/add_new.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_assists/src/handlers/add_new.rs b/crates/ra_assists/src/handlers/add_new.rs
index c10397249..240b19fa3 100644
--- a/crates/ra_assists/src/handlers/add_new.rs
+++ b/crates/ra_assists/src/handlers/add_new.rs
@@ -1,8 +1,7 @@
1use hir::Adt; 1use hir::Adt;
2use ra_syntax::{ 2use ra_syntax::{
3 ast::{ 3 ast::{
4 self, AstNode, AstToken, NameOwner, StructKind, TypeAscriptionOwner, TypeParamsOwner, 4 self, AstNode, NameOwner, StructKind, TypeAscriptionOwner, TypeParamsOwner, VisibilityOwner,
5 VisibilityOwner,
6 }, 5 },
7 TextUnit, T, 6 TextUnit, T,
8}; 7};
@@ -106,7 +105,7 @@ fn generate_impl_text(strukt: &ast::StructDef, code: &str) -> String {
106 if let Some(type_params) = type_params { 105 if let Some(type_params) = type_params {
107 let lifetime_params = type_params 106 let lifetime_params = type_params
108 .lifetime_params() 107 .lifetime_params()
109 .filter_map(|it| it.lifetime()) 108 .filter_map(|it| it.lifetime_token())
110 .map(|it| it.text().clone()); 109 .map(|it| it.text().clone());
111 let type_params = 110 let type_params =
112 type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone()); 111 type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone());