diff options
Diffstat (limited to 'crates/ra_assists/src/assists/add_missing_impl_members.rs')
-rw-r--r-- | crates/ra_assists/src/assists/add_missing_impl_members.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs index 2894bdd8a..22d20909d 100644 --- a/crates/ra_assists/src/assists/add_missing_impl_members.rs +++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs | |||
@@ -4,7 +4,7 @@ use ra_syntax::{ | |||
4 | SmolStr, | 4 | SmolStr, |
5 | }; | 5 | }; |
6 | 6 | ||
7 | use crate::{ast_builder::AstBuilder, ast_editor::AstEditor, Assist, AssistCtx, AssistId}; | 7 | use crate::{ast_builder::Make, ast_editor::AstEditor, Assist, AssistCtx, AssistId}; |
8 | 8 | ||
9 | #[derive(PartialEq)] | 9 | #[derive(PartialEq)] |
10 | enum AddMissingImplMembersMode { | 10 | enum AddMissingImplMembersMode { |
@@ -102,9 +102,7 @@ fn strip_docstring(item: ast::ImplItem) -> ast::ImplItem { | |||
102 | fn add_body(fn_def: ast::FnDef) -> ast::FnDef { | 102 | fn add_body(fn_def: ast::FnDef) -> ast::FnDef { |
103 | let mut ast_editor = AstEditor::new(fn_def.clone()); | 103 | let mut ast_editor = AstEditor::new(fn_def.clone()); |
104 | if fn_def.body().is_none() { | 104 | if fn_def.body().is_none() { |
105 | ast_editor.set_body(&AstBuilder::<ast::Block>::single_expr( | 105 | ast_editor.set_body(&Make::<ast::Block>::single_expr(Make::<ast::Expr>::unimplemented())); |
106 | &AstBuilder::<ast::Expr>::unimplemented(), | ||
107 | )); | ||
108 | } | 106 | } |
109 | ast_editor.ast().to_owned() | 107 | ast_editor.ast().to_owned() |
110 | } | 108 | } |