Unnamed repository; edit this file 'description' to name the repository.
fix doc
| -rw-r--r-- | crates/syntax/src/ast/edit_in_place.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs index da5dcb5d80..defa2f10f7 100644 --- a/crates/syntax/src/ast/edit_in_place.rs +++ b/crates/syntax/src/ast/edit_in_place.rs @@ -357,7 +357,8 @@ impl ast::RecordExprFieldList { } impl ast::RecordExprField { - /// [`SyntaxEditor`]-based equivalent of [`replace_expr`](Self::replace_expr). + /// This will either replace the initializer, or in the case that this is a shorthand convert + /// the initializer into the name ref and insert the expr as the new initializer. pub fn replace_expr_with_editor(&self, editor: &SyntaxEditor, expr: ast::Expr) { if self.name_ref().is_some() { if let Some(prev) = self.expr() { |