feat: add assoc func quickfix for unresolved_method diagnostic

This commit is contained in:
Young-Flash 2023-12-12 20:24:33 +08:00 committed by Young-Flash
parent 34df29620a
commit 69410bb488
5 changed files with 139 additions and 9 deletions

View file

@ -8,7 +8,7 @@ pub use hir_ty::diagnostics::{CaseType, IncorrectCase};
use base_db::CrateId;
use cfg::{CfgExpr, CfgOptions};
use either::Either;
use hir_def::path::ModPath;
use hir_def::{path::ModPath, AssocItemId};
use hir_expand::{name::Name, HirFileId, InFile};
use syntax::{ast, AstPtr, SyntaxError, SyntaxNodePtr, TextRange};
@ -215,6 +215,7 @@ pub struct UnresolvedMethodCall {
pub receiver: Type,
pub name: Name,
pub field_with_same_name: Option<Type>,
pub assoc_func_with_same_name: Option<AssocItemId>,
}
#[derive(Debug)]