X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fhir%2Fmap%2Fcollector.rs;h=c69d682b6f796462633036a553566daa87e20ab7;hb=7bc94cc3c2ccef8b4d393910bb978a6487db1202;hp=b8bd1d73fc28b4e12e786aea303dc12430ea2d2c;hpb=6968e53a5c4e6d883ae4683d76bb5a8ca444aedb;p=rust.git diff --git a/src/librustc/hir/map/collector.rs b/src/librustc/hir/map/collector.rs index b8bd1d73fc2..c69d682b6f7 100644 --- a/src/librustc/hir/map/collector.rs +++ b/src/librustc/hir/map/collector.rs @@ -340,7 +340,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> { /// 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) { @@ -378,7 +378,7 @@ fn visit_item(&mut self, i: &'hir Item) { 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)); @@ -427,7 +427,7 @@ fn visit_impl_item(&mut self, ii: &'hir ImplItem) { } 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)