diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 15:21:30 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 15:21:30 +0100 |
commit | 6f8aa75329d0a4e588e58b8f22f7932bf3d3a706 (patch) | |
tree | 9bf4ba410b86ee0b262ce1b0379bbf8dc64b07e6 /crates/ra_syntax/src/ast/make.rs | |
parent | 98ec5f2c21d0072e4811309ac111db75b87146d1 (diff) |
Rename RecordLit -> RecordExpr
Diffstat (limited to 'crates/ra_syntax/src/ast/make.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/make.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index 4759f23a5..183ec4481 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs | |||
@@ -64,13 +64,13 @@ pub fn use_item(use_tree: ast::UseTree) -> ast::Use { | |||
64 | ast_from_text(&format!("use {};", use_tree)) | 64 | ast_from_text(&format!("use {};", use_tree)) |
65 | } | 65 | } |
66 | 66 | ||
67 | pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordField { | 67 | pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordExprField { |
68 | return match expr { | 68 | return match expr { |
69 | Some(expr) => from_text(&format!("{}: {}", name, expr)), | 69 | Some(expr) => from_text(&format!("{}: {}", name, expr)), |
70 | None => from_text(&name.to_string()), | 70 | None => from_text(&name.to_string()), |
71 | }; | 71 | }; |
72 | 72 | ||
73 | fn from_text(text: &str) -> ast::RecordField { | 73 | fn from_text(text: &str) -> ast::RecordExprField { |
74 | ast_from_text(&format!("fn f() {{ S {{ {}, }} }}", text)) | 74 | ast_from_text(&format!("fn f() {{ S {{ {}, }} }}", text)) |
75 | } | 75 | } |
76 | } | 76 | } |