impl<'v> ItemLikeVisitor<'v> for RegistrarFinder {
fn visit_item(&mut self, item: &hir::Item) {
- if let hir::ItemKind::Fn(..) = item.node {
+ if let hir::ItemKind::Fn(..) = item.kind {
if attr::contains_name(&item.attrs, sym::plugin_registrar) {
self.registrars.push((item.hir_id, item.span));
}
0 => None,
1 => {
let (hir_id, _) = finder.registrars.pop().unwrap();
- Some(tcx.hir().local_def_id_from_hir_id(hir_id))
+ Some(tcx.hir().local_def_id(hir_id))
},
_ => {
let diagnostic = tcx.sess.diagnostic();