aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers/move_bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/handlers/move_bounds.rs')
-rw-r--r--crates/ra_assists/src/handlers/move_bounds.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/move_bounds.rs b/crates/ra_assists/src/handlers/move_bounds.rs
index 93f26f51a..0f26884dc 100644
--- a/crates/ra_assists/src/handlers/move_bounds.rs
+++ b/crates/ra_assists/src/handlers/move_bounds.rs
@@ -2,6 +2,7 @@ use ra_syntax::{
2 ast::{self, edit::AstNodeEdit, make, AstNode, NameOwner, TypeBoundsOwner}, 2 ast::{self, edit::AstNodeEdit, make, AstNode, NameOwner, TypeBoundsOwner},
3 match_ast, 3 match_ast,
4 SyntaxKind::*, 4 SyntaxKind::*,
5 T,
5}; 6};
6 7
7use crate::{Assist, AssistCtx, AssistId}; 8use crate::{Assist, AssistCtx, AssistId};
@@ -42,7 +43,7 @@ pub(crate) fn move_bounds_to_where_clause(ctx: AssistCtx) -> Option<Assist> {
42 ast::EnumDef(it) => it.variant_list()?.syntax().clone().into(), 43 ast::EnumDef(it) => it.variant_list()?.syntax().clone().into(),
43 ast::StructDef(it) => { 44 ast::StructDef(it) => {
44 it.syntax().children_with_tokens() 45 it.syntax().children_with_tokens()
45 .find(|it| it.kind() == RECORD_FIELD_DEF_LIST || it.kind() == SEMI)? 46 .find(|it| it.kind() == RECORD_FIELD_DEF_LIST || it.kind() == T![;])?
46 }, 47 },
47 _ => return None 48 _ => return None
48 } 49 }