diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_assists/src/ast_builder.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/ast_builder.rs b/crates/ra_assists/src/ast_builder.rs index f6409085a..9a62b96b3 100644 --- a/crates/ra_assists/src/ast_builder.rs +++ b/crates/ra_assists/src/ast_builder.rs | |||
@@ -44,7 +44,7 @@ impl Make<ast::Expr> { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | impl Make<ast::NameRef> { | 46 | impl Make<ast::NameRef> { |
47 | pub fn new(text: &str) -> ast::NameRef { | 47 | pub fn from(text: &str) -> ast::NameRef { |
48 | ast_node_from_file_text(&format!("fn f() {{ {}; }}", text)) | 48 | ast_node_from_file_text(&format!("fn f() {{ {}; }}", text)) |
49 | } | 49 | } |
50 | } | 50 | } |
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 836e15a4b..f07061e99 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -60,7 +60,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> | |||
60 | let mut ast_editor = AstEditor::new(node); | 60 | let mut ast_editor = AstEditor::new(node); |
61 | for f in d.missed_fields.iter() { | 61 | for f in d.missed_fields.iter() { |
62 | let field = Make::<ast::RecordField>::from( | 62 | let field = Make::<ast::RecordField>::from( |
63 | Make::<ast::NameRef>::new(&f.to_string()), | 63 | Make::<ast::NameRef>::from(&f.to_string()), |
64 | Some(Make::<ast::Expr>::unit()), | 64 | Some(Make::<ast::Expr>::unit()), |
65 | ); | 65 | ); |
66 | ast_editor.append_field(&field); | 66 | ast_editor.append_field(&field); |