1
Fork 0

Move methods from Map to TyCtxt, part 5.

This eliminates all methods on `Map`. Actually removing `Map` will occur
in a follow-up PR.
This commit is contained in:
Nicholas Nethercote 2025-04-02 07:04:24 +11:00
parent 0b4a81a4ef
commit 6713f34ee4
75 changed files with 175 additions and 208 deletions

View file

@ -392,7 +392,7 @@ where
}
_ => {
self.tcx.dcx().span_delayed_bug(
self.tcx.hir().span(arg.hir_id()),
self.tcx.hir_span(arg.hir_id()),
"no valid for captured arg",
);
}

View file

@ -1403,7 +1403,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
CItemKind::Definition => "fn",
};
let span_note = if let ty::Adt(def, _) = ty.kind()
&& let Some(sp) = self.cx.tcx.hir().span_if_local(def.did())
&& let Some(sp) = self.cx.tcx.hir_span_if_local(def.did())
{
Some(sp)
} else {