diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 19:51:43 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 19:51:43 +0100 |
commit | 2e2642efccd5855e4158b01a006e7884a96982bb (patch) | |
tree | de4342a453b3b504178dd17c46fab3e1d6e995d2 /crates/ra_assists/src/handlers/generate_new.rs | |
parent | fbe60a2e284035d16c2a1ee743ee88db418689aa (diff) |
Remove TypeAscriptionOwner
Diffstat (limited to 'crates/ra_assists/src/handlers/generate_new.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/generate_new.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_assists/src/handlers/generate_new.rs b/crates/ra_assists/src/handlers/generate_new.rs index 3c67749ee..b84aa24b6 100644 --- a/crates/ra_assists/src/handlers/generate_new.rs +++ b/crates/ra_assists/src/handlers/generate_new.rs | |||
@@ -1,9 +1,6 @@ | |||
1 | use hir::Adt; | 1 | use hir::Adt; |
2 | use ra_syntax::{ | 2 | use ra_syntax::{ |
3 | ast::{ | 3 | ast::{self, AstNode, GenericParamsOwner, NameOwner, StructKind, VisibilityOwner}, |
4 | self, AstNode, GenericParamsOwner, NameOwner, StructKind, TypeAscriptionOwner, | ||
5 | VisibilityOwner, | ||
6 | }, | ||
7 | T, | 4 | T, |
8 | }; | 5 | }; |
9 | use stdx::{format_to, SepBy}; | 6 | use stdx::{format_to, SepBy}; |
@@ -54,9 +51,7 @@ pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
54 | 51 | ||
55 | let params = field_list | 52 | let params = field_list |
56 | .fields() | 53 | .fields() |
57 | .filter_map(|f| { | 54 | .filter_map(|f| Some(format!("{}: {}", f.name()?.syntax(), f.ty()?.syntax()))) |
58 | Some(format!("{}: {}", f.name()?.syntax(), f.ascribed_type()?.syntax())) | ||
59 | }) | ||
60 | .sep_by(", "); | 55 | .sep_by(", "); |
61 | let fields = field_list.fields().filter_map(|f| f.name()).sep_by(", "); | 56 | let fields = field_list.fields().filter_map(|f| f.name()).sep_by(", "); |
62 | 57 | ||