diff options
author | Aleksey Kladov <[email protected]> | 2019-09-25 12:35:26 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-09-25 12:35:26 +0100 |
commit | 69689625ce4465f2d008d6543553d0d91d53dca4 (patch) | |
tree | 3e3f08ada8011f300faae3966cbe61a4a7dd7377 /crates/ra_assists/src/assists | |
parent | f32081fa185b3a9df021f277c2c27fbd123d0951 (diff) |
move ast builder to a separate file
Diffstat (limited to 'crates/ra_assists/src/assists')
-rw-r--r-- | crates/ra_assists/src/assists/add_missing_impl_members.rs | 5 | ||||
-rw-r--r-- | crates/ra_assists/src/assists/fill_match_arms.rs | 2 | ||||
-rw-r--r-- | crates/ra_assists/src/assists/move_bounds.rs | 2 |
3 files changed, 3 insertions, 6 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 cbeb7054f..2894bdd8a 100644 --- a/crates/ra_assists/src/assists/add_missing_impl_members.rs +++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs | |||
@@ -4,10 +4,7 @@ use ra_syntax::{ | |||
4 | SmolStr, | 4 | SmolStr, |
5 | }; | 5 | }; |
6 | 6 | ||
7 | use crate::{ | 7 | use crate::{ast_builder::AstBuilder, ast_editor::AstEditor, Assist, AssistCtx, AssistId}; |
8 | ast_editor::{AstBuilder, AstEditor}, | ||
9 | Assist, AssistCtx, AssistId, | ||
10 | }; | ||
11 | 8 | ||
12 | #[derive(PartialEq)] | 9 | #[derive(PartialEq)] |
13 | enum AddMissingImplMembersMode { | 10 | enum AddMissingImplMembersMode { |
diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs index f59062bb9..771aa625f 100644 --- a/crates/ra_assists/src/assists/fill_match_arms.rs +++ b/crates/ra_assists/src/assists/fill_match_arms.rs | |||
@@ -3,7 +3,7 @@ use std::iter; | |||
3 | use hir::{db::HirDatabase, Adt, HasSource}; | 3 | use hir::{db::HirDatabase, Adt, HasSource}; |
4 | use ra_syntax::ast::{self, AstNode, NameOwner}; | 4 | use ra_syntax::ast::{self, AstNode, NameOwner}; |
5 | 5 | ||
6 | use crate::{ast_editor::AstBuilder, Assist, AssistCtx, AssistId}; | 6 | use crate::{ast_builder::AstBuilder, Assist, AssistCtx, AssistId}; |
7 | 7 | ||
8 | pub(crate) fn fill_match_arms(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 8 | pub(crate) fn fill_match_arms(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { |
9 | let match_expr = ctx.node_at_offset::<ast::MatchExpr>()?; | 9 | let match_expr = ctx.node_at_offset::<ast::MatchExpr>()?; |
diff --git a/crates/ra_assists/src/assists/move_bounds.rs b/crates/ra_assists/src/assists/move_bounds.rs index 526de1d98..aa9036fed 100644 --- a/crates/ra_assists/src/assists/move_bounds.rs +++ b/crates/ra_assists/src/assists/move_bounds.rs | |||
@@ -6,7 +6,7 @@ use ra_syntax::{ | |||
6 | TextRange, | 6 | TextRange, |
7 | }; | 7 | }; |
8 | 8 | ||
9 | use crate::{ast_editor::AstBuilder, Assist, AssistCtx, AssistId}; | 9 | use crate::{ast_builder::AstBuilder, Assist, AssistCtx, AssistId}; |
10 | 10 | ||
11 | pub(crate) fn move_bounds_to_where_clause(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 11 | pub(crate) fn move_bounds_to_where_clause(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { |
12 | let type_param_list = ctx.node_at_offset::<ast::TypeParamList>()?; | 12 | let type_param_list = ctx.node_at_offset::<ast::TypeParamList>()?; |