fix a panic with glob-import missing a source map

This commit is contained in:
Aleksey Kladov 2019-04-02 13:26:09 +03:00
parent ab19ff16e5
commit 49f13d3a9b
5 changed files with 26 additions and 23 deletions

View file

@ -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(