resolve: Remove struct_field_names_untracked
This commit is contained in:
parent
2a716f3563
commit
b3ee735993
8 changed files with 56 additions and 76 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue