Reimplement auto-ref completions for fields

This commit is contained in:
Lukas Wirth 2022-06-20 20:22:51 +02:00
parent 46d22719fc
commit 8b078986dc
4 changed files with 35 additions and 12 deletions

View file

@ -379,6 +379,7 @@ impl Completions {
pub(crate) fn add_field(
&mut self,
ctx: &CompletionContext,
dot_access: &DotAccess,
receiver: Option<hir::Name>,
field: hir::Field,
ty: &hir::Type,
@ -390,6 +391,7 @@ impl Completions {
};
let item = render_field(
RenderContext::new(ctx).private_editable(is_private_editable),
dot_access,
receiver,
field,
ty,