}
fn check_foreign_fn(&mut self, id: hir::HirId, decl: &hir::FnDecl) {
- let def_id = self.cx.tcx.hir().local_def_id_from_hir_id(id);
+ let def_id = self.cx.tcx.hir().local_def_id(id);
let sig = self.cx.tcx.fn_sig(def_id);
let sig = self.cx.tcx.erase_late_bound_regions(&sig);
let inputs = if sig.c_variadic {
}
fn check_foreign_static(&mut self, id: hir::HirId, span: Span) {
- let def_id = self.cx.tcx.hir().local_def_id_from_hir_id(id);
+ let def_id = self.cx.tcx.hir().local_def_id(id);
let ty = self.cx.tcx.type_of(def_id);
self.check_type_for_ffi_and_report_errors(span, ty);
}
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for VariantSizeDifferences {
fn check_item(&mut self, cx: &LateContext<'_, '_>, it: &hir::Item) {
if let hir::ItemKind::Enum(ref enum_definition, _) = it.node {
- let item_def_id = cx.tcx.hir().local_def_id_from_hir_id(it.hir_id);
+ let item_def_id = cx.tcx.hir().local_def_id(it.hir_id);
let t = cx.tcx.type_of(item_def_id);
let ty = cx.tcx.erase_regions(&t);
let layout = match cx.layout_of(ty) {