aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_path.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-02 11:26:09 +0100
committerAleksey Kladov <[email protected]>2019-04-02 11:26:09 +0100
commit49f13d3a9bb5bf3ab92c3fbf23ad79cb001b76e0 (patch)
tree55a59317e363ba5aa419366643502ce3656e1bb2 /crates/ra_ide_api/src/completion/complete_path.rs
parentab19ff16e55d4d64445fc2809e52d913ad492040 (diff)
fix a panic with glob-import missing a source map
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_path.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs12
1 files changed, 12 insertions, 0 deletions
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
@@ -73,6 +73,18 @@ mod tests {
73 } 73 }
74 74
75 #[test] 75 #[test]
76 fn dont_complete_current_use_in_braces_with_glob() {
77 let completions = do_completion(
78 r"
79 mod foo { pub struct S; }
80 use self::{foo::*, bar<|>};
81 ",
82 CompletionKind::Reference,
83 );
84 assert_eq!(completions.len(), 2);
85 }
86
87 #[test]
76 fn completes_mod_with_docs() { 88 fn completes_mod_with_docs() {
77 check_reference_completion( 89 check_reference_completion(
78 "mod_with_docs", 90 "mod_with_docs",