diff options
Diffstat (limited to 'crates/syntax/src/ast')
-rw-r--r-- | crates/syntax/src/ast/edit.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 2667d9af4..190746e09 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs | |||
@@ -601,6 +601,9 @@ pub trait AstNodeEdit: AstNode + Clone + Sized { | |||
601 | } | 601 | } |
602 | rewriter.rewrite_ast(self) | 602 | rewriter.rewrite_ast(self) |
603 | } | 603 | } |
604 | fn indent_level(&self) -> IndentLevel { | ||
605 | IndentLevel::from_node(self.syntax()) | ||
606 | } | ||
604 | #[must_use] | 607 | #[must_use] |
605 | fn indent(&self, level: IndentLevel) -> Self { | 608 | fn indent(&self, level: IndentLevel) -> Self { |
606 | Self::cast(level.increase_indent(self.syntax().clone())).unwrap() | 609 | Self::cast(level.increase_indent(self.syntax().clone())).unwrap() |