1
Fork 0

Rollup merge of #139232 - nnethercote:remove-Map-5, r=Zalathar

Move methods from `Map` to `TyCtxt`, part 5.

This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR.

A follow-up to #137504.

r? `@Zalathar`
This commit is contained in:
Takayuki Maeda 2025-04-02 22:52:46 +09:00 committed by GitHub
commit bda2ea4d01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 {