aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r--crates/ra_syntax/src/ast/edit.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index 68dae008f..324327162 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -296,11 +296,11 @@ impl ast::UseTree {
296} 296}
297 297
298#[must_use] 298#[must_use]
299pub fn strip_attrs_and_docs<N: ast::AttrsOwner>(node: &N) -> N { 299pub fn remove_attrs_and_docs<N: ast::AttrsOwner>(node: &N) -> N {
300 N::cast(strip_attrs_and_docs_inner(node.syntax().clone())).unwrap() 300 N::cast(remove_attrs_and_docs_inner(node.syntax().clone())).unwrap()
301} 301}
302 302
303fn strip_attrs_and_docs_inner(mut node: SyntaxNode) -> SyntaxNode { 303fn remove_attrs_and_docs_inner(mut node: SyntaxNode) -> SyntaxNode {
304 while let Some(start) = 304 while let Some(start) =
305 node.children_with_tokens().find(|it| it.kind() == ATTR || it.kind() == COMMENT) 305 node.children_with_tokens().find(|it| it.kind() == ATTR || it.kind() == COMMENT)
306 { 306 {