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

@ -1680,6 +1680,7 @@ impl DefWithBody {
receiver,
name,
field_with_same_name,
assoc_func_with_same_name,
} => {
let expr = expr_syntax(*expr);
@ -1691,6 +1692,7 @@ impl DefWithBody {
field_with_same_name: field_with_same_name
.clone()
.map(|ty| Type::new(db, DefWithBodyId::from(self), ty)),
assoc_func_with_same_name: assoc_func_with_same_name.clone(),
}
.into(),
)