mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Simplify CompletionContext by introducing a path CallKind enum
This commit is contained in:
parent
ad9234fef2
commit
e475bcdcc6
6 changed files with 49 additions and 32 deletions
|
@ -24,7 +24,7 @@ pub(crate) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
}
|
||||
|
||||
let (dot_receiver, receiver_is_ambiguous_float_literal) = match &ctx.completion_location {
|
||||
Some(ImmediateLocation::MethodCall { receiver: Some(it) }) => (it, false),
|
||||
Some(ImmediateLocation::MethodCall { receiver: Some(it), .. }) => (it, false),
|
||||
Some(ImmediateLocation::FieldAccess {
|
||||
receiver: Some(it),
|
||||
receiver_is_ambiguous_float_literal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue