Rename name field to ctor as well

This commit is contained in:
Florian Diebold 2019-03-21 22:29:12 +01:00
parent 97be0e6c46
commit cbb418ebb8
5 changed files with 29 additions and 29 deletions

View file

@ -24,7 +24,7 @@ pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) {
fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) {
for receiver in receiver.autoderef(ctx.db) {
match receiver {
Ty::Apply(a_ty) => match a_ty.name {
Ty::Apply(a_ty) => match a_ty.ctor {
TypeCtor::Adt(AdtDef::Struct(s)) => {
for field in s.fields(ctx.db) {
acc.add_field(ctx, field, &a_ty.parameters);