This commit is contained in:
Aleksey Kladov 2019-09-06 21:57:11 +03:00
parent 219287a14c
commit 6c11935712

View file

@ -6,7 +6,10 @@ use rustc_hash::FxHashMap;
use crate::completion::{CompletionContext, CompletionItem, CompletionKind, Completions};
pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) {
if ctx.is_trivial_path {
if !ctx.is_trivial_path {
return;
}
let names = ctx.analyzer.all_names(ctx.db);
names.into_iter().for_each(|(name, res)| acc.add_resolution(ctx, name.to_string(), &res));
@ -46,7 +49,6 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) {
}
});
}
}
}
fn build_import_label(name: &str, path: &[SmolStr]) -> String {