1
Fork 0

Move methods from Map to TyCtxt, part 4.

Continuing the work from #137350.

Removes the unused methods: `expect_variant`, `expect_field`,
`expect_foreign_item`.

Every method gains a `hir_` prefix.
This commit is contained in:
Nicholas Nethercote 2025-02-21 18:33:05 +11:00
parent 281af35cc3
commit 256c27e748
115 changed files with 269 additions and 321 deletions

View file

@ -8,7 +8,7 @@ fn proc_macro_decls_static(tcx: TyCtxt<'_>, (): ()) -> Option<LocalDefId> {
let mut decls = None;
for id in tcx.hir_free_items() {
let attrs = tcx.hir().attrs(id.hir_id());
let attrs = tcx.hir_attrs(id.hir_id());
if attr::contains_name(attrs, sym::rustc_proc_macro_decls) {
decls = Some(id.owner_id.def_id);
}