From 49f13d3a9bb5bf3ab92c3fbf23ad79cb001b76e0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 2 Apr 2019 13:26:09 +0300 Subject: fix a panic with glob-import missing a source map --- crates/ra_ide_api/src/completion/complete_path.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index 5ff1b9927..122dd7bdd 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs @@ -72,6 +72,18 @@ mod tests { assert!(completions.is_empty()); } + #[test] + fn dont_complete_current_use_in_braces_with_glob() { + let completions = do_completion( + r" + mod foo { pub struct S; } + use self::{foo::*, bar<|>}; + ", + CompletionKind::Reference, + ); + assert_eq!(completions.len(), 2); + } + #[test] fn completes_mod_with_docs() { check_reference_completion( -- cgit v1.2.3