mess,
|diag| {
if let Some(local_def_id) = impl_id.as_local() {
- let hir_id = cx.tcx.hir().as_local_hir_id(local_def_id);
+ let hir_id = cx.tcx.hir().local_def_id_to_hir_id(local_def_id);
diag.span_note(
cx.tcx.hir().span(hir_id),
"`PartialEq` implemented here"
mess,
|diag| {
if let Some(local_def_id) = impl_id.as_local() {
- let hir_id = cx.tcx.hir().as_local_hir_id(local_def_id);
+ let hir_id = cx.tcx.hir().local_def_id_to_hir_id(local_def_id);
diag.span_note(
cx.tcx.hir().span(hir_id),
"`PartialOrd` implemented here"
ty: Ty<'tcx>,
) {
fn item_from_def_id<'tcx>(cx: &LateContext<'tcx>, def_id: DefId) -> &'tcx Item<'tcx> {
- let hir_id = cx.tcx.hir().as_local_hir_id(def_id.expect_local());
+ let hir_id = cx.tcx.hir().local_def_id_to_hir_id(def_id.expect_local());
cx.tcx.hir().expect_item(hir_id)
}
if match_path(&trait_ref.path, &paths::SERDE_DESERIALIZE);
if let ty::Adt(def, _) = ty.kind;
if let Some(local_def_id) = def.did.as_local();
- let adt_hir_id = cx.tcx.hir().as_local_hir_id(local_def_id);
+ let adt_hir_id = cx.tcx.hir().local_def_id_to_hir_id(local_def_id);
if !is_allowed(cx, UNSAFE_DERIVE_DESERIALIZE, adt_hir_id);
if cx.tcx.inherent_impls(def.did)
.iter()