mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
fix: Improve self param completion applicability
This commit is contained in:
parent
25090f0e6d
commit
b96f8f18b0
6 changed files with 124 additions and 18 deletions
|
@ -198,7 +198,7 @@ pub(super) enum Qualified {
|
|||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub(super) struct PatternContext {
|
||||
pub(super) refutability: PatternRefutability,
|
||||
pub(super) param_ctx: Option<(ast::ParamList, ast::Param, ParamKind)>,
|
||||
pub(super) param_ctx: Option<ParamContext>,
|
||||
pub(super) has_type_ascription: bool,
|
||||
pub(super) parent_pat: Option<ast::Pat>,
|
||||
pub(super) ref_token: Option<SyntaxToken>,
|
||||
|
@ -208,6 +208,13 @@ pub(super) struct PatternContext {
|
|||
pub(super) impl_: Option<ast::Impl>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub(super) struct ParamContext {
|
||||
pub(super) param_list: ast::ParamList,
|
||||
pub(super) param: ast::Param,
|
||||
pub(super) kind: ParamKind,
|
||||
}
|
||||
|
||||
/// The state of the lifetime we are completing.
|
||||
#[derive(Debug)]
|
||||
pub(super) struct LifetimeContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue