mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
docs
This commit is contained in:
parent
200cc0a1e3
commit
a8e04a7028
7 changed files with 181 additions and 167 deletions
|
@ -1,8 +1,8 @@
|
|||
use crate::{
|
||||
completion::{CompletionItem, Completions, CompletionKind::*, SyntaxContext},
|
||||
completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
|
||||
};
|
||||
|
||||
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &SyntaxContext) {
|
||||
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) {
|
||||
return;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &SyntaxContext)
|
|||
.add_to(acc);
|
||||
}
|
||||
|
||||
pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &SyntaxContext) {
|
||||
pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
if !ctx.is_new_item {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue