hir_id: hir::HirId,
) {
let expr = &body.value;
- let node_id = cx.tcx.hir().hir_to_node_id(hir_id);
- if unsafety == hir::Unsafety::Normal && cx.access_levels.is_exported(node_id) {
+ if unsafety == hir::Unsafety::Normal && cx.access_levels.is_exported(hir_id) {
let raw_ptrs = iter_input_pats(decl, body)
.zip(decl.inputs.iter())
.filter_map(|(arg, ty)| raw_ptr_arg(arg, ty))
}
},
hir::ExprKind::MethodCall(_, _, ref args) => {
- let def_id = self.tables.type_dependent_defs()[expr.hir_id].def_id();
+ let def_id = self.tables.type_dependent_def_id(expr.hir_id).unwrap();
let base_type = self.cx.tcx.type_of(def_id);
if type_is_unsafe_function(self.cx, base_type) {