diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-25 12:35:50 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-25 12:35:50 +0100 |
commit | 8f92309dbc00a0f88563030921706f205c01f452 (patch) | |
tree | 3e3f08ada8011f300faae3966cbe61a4a7dd7377 /crates/ra_ide_api | |
parent | d9b4835625ac96c7628e2ef66ef6e26cc48d231f (diff) | |
parent | 69689625ce4465f2d008d6543553d0d91d53dca4 (diff) |
Merge #1909
1909: move ast builder to a separate file r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_scope.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide_api/src/completion/complete_scope.rs index c1f48b026..cb70a1f21 100644 --- a/crates/ra_ide_api/src/completion/complete_scope.rs +++ b/crates/ra_ide_api/src/completion/complete_scope.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ra_assists::auto_import; | 1 | use ra_assists::auto_import_text_edit; |
2 | use ra_syntax::{ast, AstNode, SmolStr}; | 2 | use ra_syntax::{ast, AstNode, SmolStr}; |
3 | use ra_text_edit::TextEditBuilder; | 3 | use ra_text_edit::TextEditBuilder; |
4 | use rustc_hash::FxHashMap; | 4 | use rustc_hash::FxHashMap; |
@@ -23,7 +23,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) { | |||
23 | let edit = { | 23 | let edit = { |
24 | let mut builder = TextEditBuilder::default(); | 24 | let mut builder = TextEditBuilder::default(); |
25 | builder.replace(ctx.source_range(), name.to_string()); | 25 | builder.replace(ctx.source_range(), name.to_string()); |
26 | auto_import::auto_import_text_edit( | 26 | auto_import_text_edit( |
27 | &ctx.token.parent(), | 27 | &ctx.token.parent(), |
28 | &ctx.token.parent(), | 28 | &ctx.token.parent(), |
29 | &path, | 29 | &path, |
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 93e1e7c2d..30b95a215 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -2,7 +2,7 @@ use std::cell::RefCell; | |||
2 | 2 | ||
3 | use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink}; | 3 | use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink}; |
4 | use itertools::Itertools; | 4 | use itertools::Itertools; |
5 | use ra_assists::ast_editor::{AstBuilder, AstEditor}; | 5 | use ra_assists::{ast_builder::AstBuilder, ast_editor::AstEditor}; |
6 | use ra_db::SourceDatabase; | 6 | use ra_db::SourceDatabase; |
7 | use ra_prof::profile; | 7 | use ra_prof::profile; |
8 | use ra_syntax::{ | 8 | use ra_syntax::{ |