mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Renamed the trait completion mod.
This commit is contained in:
parent
e3cda83f90
commit
bc1fc6239d
2 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ mod complete_path;
|
||||||
mod complete_scope;
|
mod complete_scope;
|
||||||
mod complete_postfix;
|
mod complete_postfix;
|
||||||
mod complete_macro_in_item_position;
|
mod complete_macro_in_item_position;
|
||||||
mod complete_impl_fn;
|
mod complete_trait_impl;
|
||||||
|
|
||||||
use ra_db::SourceDatabase;
|
use ra_db::SourceDatabase;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ pub(crate) fn completions(db: &db::RootDatabase, position: FilePosition) -> Opti
|
||||||
complete_pattern::complete_pattern(&mut acc, &ctx);
|
complete_pattern::complete_pattern(&mut acc, &ctx);
|
||||||
complete_postfix::complete_postfix(&mut acc, &ctx);
|
complete_postfix::complete_postfix(&mut acc, &ctx);
|
||||||
complete_macro_in_item_position::complete_macro_in_item_position(&mut acc, &ctx);
|
complete_macro_in_item_position::complete_macro_in_item_position(&mut acc, &ctx);
|
||||||
complete_impl_fn::complete_impl_fn(&mut acc, &ctx);
|
complete_trait_impl::complete_trait_impl(&mut acc, &ctx);
|
||||||
|
|
||||||
Some(acc)
|
Some(acc)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ use hir::{ self, db::HirDatabase, HasSource };
|
||||||
|
|
||||||
use ra_syntax::{ ast, ast::AstNode };
|
use ra_syntax::{ ast, ast::AstNode };
|
||||||
|
|
||||||
pub(crate) fn complete_impl_fn(acc: &mut Completions, ctx: &CompletionContext) {
|
pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
let impl_trait = ast::ItemList::cast(ctx.token.parent())
|
let impl_trait = ast::ItemList::cast(ctx.token.parent())
|
||||||
.and_then(|item_list| item_list.syntax().parent())
|
.and_then(|item_list| item_list.syntax().parent())
|
||||||
.and_then(|item_list_parent| ast::ImplBlock::cast(item_list_parent))
|
.and_then(|item_list_parent| ast::ImplBlock::cast(item_list_parent))
|
Loading…
Add table
Add a link
Reference in a new issue