diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-12 07:52:38 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-12 07:52:38 +0000 |
commit | 0156a538089828340a823ed02da8970bf4f1175b (patch) | |
tree | 07c4eacaad717ea802ab26972f45223281f2c9c1 /crates/ra_analysis/src/completion.rs | |
parent | f655f993fe6d9faa81b0e776b9b24308d2ea1c68 (diff) | |
parent | 0527e3b283af0153cf13fa64fe73862a5b7655c8 (diff) |
Merge #276
276: Extract and rename AtomEdit and Edit into ra_text_edit r=matklad a=vemoo
As discused in #105
Co-authored-by: Bernardo <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/completion.rs')
-rw-r--r-- | crates/ra_analysis/src/completion.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/completion.rs b/crates/ra_analysis/src/completion.rs index 0f154112a..f480af611 100644 --- a/crates/ra_analysis/src/completion.rs +++ b/crates/ra_analysis/src/completion.rs | |||
@@ -1,10 +1,11 @@ | |||
1 | mod reference_completion; | 1 | mod reference_completion; |
2 | 2 | ||
3 | use ra_editor::find_node_at_offset; | 3 | use ra_editor::find_node_at_offset; |
4 | use ra_text_edit::AtomTextEdit; | ||
4 | use ra_syntax::{ | 5 | use ra_syntax::{ |
5 | algo::visit::{visitor_ctx, VisitorCtx}, | 6 | algo::visit::{visitor_ctx, VisitorCtx}, |
6 | ast, | 7 | ast, |
7 | AstNode, AtomEdit, | 8 | AstNode, |
8 | SyntaxNodeRef, | 9 | SyntaxNodeRef, |
9 | }; | 10 | }; |
10 | use ra_db::SyntaxDatabase; | 11 | use ra_db::SyntaxDatabase; |
@@ -33,7 +34,7 @@ pub(crate) fn completions( | |||
33 | let original_file = db.source_file(position.file_id); | 34 | let original_file = db.source_file(position.file_id); |
34 | // Insert a fake ident to get a valid parse tree | 35 | // Insert a fake ident to get a valid parse tree |
35 | let file = { | 36 | let file = { |
36 | let edit = AtomEdit::insert(position.offset, "intellijRulezz".to_string()); | 37 | let edit = AtomTextEdit::insert(position.offset, "intellijRulezz".to_string()); |
37 | original_file.reparse(&edit) | 38 | original_file.reparse(&edit) |
38 | }; | 39 | }; |
39 | 40 | ||