From 0f3a54dd4d439a6598526144c4ecccee9c5f1362 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 14 Mar 2020 20:24:18 +0100 Subject: wip --- crates/ra_ide/src/completion/complete_dot.rs | 4 ++-- crates/ra_ide/src/completion/complete_pattern.rs | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide/src/completion') diff --git a/crates/ra_ide/src/completion/complete_dot.rs b/crates/ra_ide/src/completion/complete_dot.rs index a30d1c2de..22f5077f5 100644 --- a/crates/ra_ide/src/completion/complete_dot.rs +++ b/crates/ra_ide/src/completion/complete_dot.rs @@ -777,8 +777,8 @@ mod tests { [ CompletionItem { label: "the_field", - source_range: [552; 553), - delete: [552; 553), + source_range: [552; 552), + delete: [552; 552), insert: "the_field", kind: Field, detail: "u32", diff --git a/crates/ra_ide/src/completion/complete_pattern.rs b/crates/ra_ide/src/completion/complete_pattern.rs index 6a1a66ef1..cb84bb934 100644 --- a/crates/ra_ide/src/completion/complete_pattern.rs +++ b/crates/ra_ide/src/completion/complete_pattern.rs @@ -89,7 +89,6 @@ mod tests { #[test] fn completes_in_simple_macro_call() { - // FIXME: doesn't work yet because of missing error recovery in macro expansion let completions = complete( r" macro_rules! m { ($e:expr) => { $e } } @@ -102,6 +101,16 @@ mod tests { } ", ); - assert_debug_snapshot!(completions, @r###"[]"###); + assert_debug_snapshot!(completions, @r###" + [ + CompletionItem { + label: "E", + source_range: [151; 151), + delete: [151; 151), + insert: "E", + kind: Enum, + }, + ] + "###); } } -- cgit v1.2.3