mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 14:43:58 +00:00
Merge #3876
3876: Better naming for scope completion r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
b7e5d94bda
3 changed files with 6 additions and 6 deletions
|
@ -10,8 +10,8 @@ mod complete_pattern;
|
||||||
mod complete_fn_param;
|
mod complete_fn_param;
|
||||||
mod complete_keyword;
|
mod complete_keyword;
|
||||||
mod complete_snippet;
|
mod complete_snippet;
|
||||||
mod complete_path;
|
mod complete_qualified_path;
|
||||||
mod complete_scope;
|
mod complete_unqualified_path;
|
||||||
mod complete_postfix;
|
mod complete_postfix;
|
||||||
mod complete_macro_in_item_position;
|
mod complete_macro_in_item_position;
|
||||||
mod complete_trait_impl;
|
mod complete_trait_impl;
|
||||||
|
@ -85,8 +85,8 @@ pub(crate) fn completions(
|
||||||
complete_keyword::complete_use_tree_keyword(&mut acc, &ctx);
|
complete_keyword::complete_use_tree_keyword(&mut acc, &ctx);
|
||||||
complete_snippet::complete_expr_snippet(&mut acc, &ctx);
|
complete_snippet::complete_expr_snippet(&mut acc, &ctx);
|
||||||
complete_snippet::complete_item_snippet(&mut acc, &ctx);
|
complete_snippet::complete_item_snippet(&mut acc, &ctx);
|
||||||
complete_path::complete_path(&mut acc, &ctx);
|
complete_qualified_path::complete_qualified_path(&mut acc, &ctx);
|
||||||
complete_scope::complete_scope(&mut acc, &ctx);
|
complete_unqualified_path::complete_unqualified_path(&mut acc, &ctx);
|
||||||
complete_dot::complete_dot(&mut acc, &ctx);
|
complete_dot::complete_dot(&mut acc, &ctx);
|
||||||
complete_record::complete_record(&mut acc, &ctx);
|
complete_record::complete_record(&mut acc, &ctx);
|
||||||
complete_pattern::complete_pattern(&mut acc, &ctx);
|
complete_pattern::complete_pattern(&mut acc, &ctx);
|
||||||
|
|
|
@ -6,7 +6,7 @@ use test_utils::tested_by;
|
||||||
|
|
||||||
use crate::completion::{CompletionContext, Completions};
|
use crate::completion::{CompletionContext, Completions};
|
||||||
|
|
||||||
pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
pub(super) fn complete_qualified_path(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
let path = match &ctx.path_prefix {
|
let path = match &ctx.path_prefix {
|
||||||
Some(path) => path.clone(),
|
Some(path) => path.clone(),
|
||||||
_ => return,
|
_ => return,
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use crate::completion::{CompletionContext, Completions};
|
use crate::completion::{CompletionContext, Completions};
|
||||||
|
|
||||||
pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) {
|
pub(super) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
if !(ctx.is_trivial_path && !ctx.is_pat_binding_or_const) {
|
if !(ctx.is_trivial_path && !ctx.is_pat_binding_or_const) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
Loading…
Reference in a new issue