Store a LocalDefId in hir::Variant & hir::Field.
This commit is contained in:
parent
607d0c2a14
commit
9d20aca983
25 changed files with 122 additions and 149 deletions
|
@ -307,8 +307,8 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
|||
}
|
||||
|
||||
fn visit_variant(&mut self, v: &'hir Variant<'hir>) {
|
||||
self.insert(v.span, v.id, Node::Variant(v));
|
||||
self.with_parent(v.id, |this| {
|
||||
self.insert(v.span, v.hir_id, Node::Variant(v));
|
||||
self.with_parent(v.hir_id, |this| {
|
||||
// Register the constructor of this variant.
|
||||
if let Some(ctor_hir_id) = v.data.ctor_hir_id() {
|
||||
this.insert(v.span, ctor_hir_id, Node::Ctor(&v.data));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue