1
Fork 0

resolve: Remove struct_field_names_untracked

This commit is contained in:
Vadim Petrochenkov 2023-02-22 13:55:06 +04:00
parent 2a716f3563
commit b3ee735993
8 changed files with 56 additions and 76 deletions

View file

@ -1581,8 +1581,11 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
)) = binding.kind
{
let def_id = self.tcx.parent(ctor_def_id);
let fields = self.field_names.get(&def_id)?;
return fields.iter().map(|name| name.span).reduce(Span::to); // None for `struct Foo()`
return self
.field_def_ids(def_id)?
.iter()
.map(|&field_id| self.def_span(field_id))
.reduce(Span::to); // None for `struct Foo()`
}
None
}