mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Auto merge of #12773 - Veykril:self-compl, r=Veykril
fix: Improve self param completion applicability Fixes https://github.com/rust-lang/rust-analyzer/issues/9522
This commit is contained in:
commit
96481b7786
6 changed files with 124 additions and 18 deletions
|
@ -199,7 +199,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>,
|
||||
|
@ -209,6 +209,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