/// their outer items.
fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'hir> {
- panic!("visit_nested_xxx must be manually implemented in this visitor")
+ panic!("`visit_nested_xxx` must be manually implemented in this visitor");
}
fn visit_nested_item(&mut self, item: ItemId) {
self.with_dep_node_owner(i.hir_id.owner, i, |this| {
this.insert(i.span, i.hir_id, Node::Item(i));
this.with_parent(i.hir_id, |this| {
- if let ItemKind::Struct(ref struct_def, _) = i.node {
+ if let ItemKind::Struct(ref struct_def, _) = i.kind {
// If this is a tuple or unit-like struct, register the constructor.
if let Some(ctor_hir_id) = struct_def.ctor_hir_id() {
this.insert(i.span, ctor_hir_id, Node::Ctor(struct_def));
}
fn visit_pat(&mut self, pat: &'hir Pat) {
- let node = if let PatKind::Binding(..) = pat.node {
+ let node = if let PatKind::Binding(..) = pat.kind {
Node::Binding(pat)
} else {
Node::Pat(pat)