mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
cleanup
This commit is contained in:
parent
a8e04a7028
commit
2ae87ffc9a
5 changed files with 7 additions and 15 deletions
|
@ -1,15 +1,11 @@
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
algo::{
|
algo::visit::{visitor_ctx, VisitorCtx},
|
||||||
visit::{visitor_ctx, VisitorCtx}
|
|
||||||
},
|
|
||||||
ast,
|
ast,
|
||||||
AstNode,
|
AstNode,
|
||||||
};
|
};
|
||||||
use rustc_hash::{FxHashMap};
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::completion::{CompletionContext, Completions, CompletionKind, CompletionItem};
|
||||||
completion::{CompletionContext, Completions, CompletionKind, CompletionItem},
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Complete repeated parametes, both name and type. For example, if all
|
/// Complete repeated parametes, both name and type. For example, if all
|
||||||
/// functions in a file have a `spam: &mut Spam` parameter, a completion with
|
/// functions in a file have a `spam: &mut Spam` parameter, a completion with
|
||||||
|
|
|
@ -5,9 +5,7 @@ use ra_syntax::{
|
||||||
SyntaxKind::*, SyntaxNodeRef,
|
SyntaxKind::*, SyntaxNodeRef,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*};
|
||||||
completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*},
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionContext) {
|
pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
if !ctx.is_trivial_path {
|
if !ctx.is_trivial_path {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
|
|
||||||
Cancelable,
|
Cancelable,
|
||||||
|
completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> {
|
pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> {
|
||||||
|
|
|
@ -2,8 +2,8 @@ use rustc_hash::FxHashSet;
|
||||||
use ra_syntax::TextUnit;
|
use ra_syntax::TextUnit;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
Cancelable,
|
||||||
completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
|
completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
|
||||||
Cancelable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> {
|
pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
use crate::{
|
use crate::completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext};
|
||||||
completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
|
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) {
|
if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue