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

@ -123,7 +123,7 @@ impl<'tcx> IfThisChanged<'tcx> {
fn process_attrs(&mut self, def_id: LocalDefId) {
let def_path_hash = self.tcx.def_path_hash(def_id.to_def_id());
let hir_id = self.tcx.local_def_id_to_hir_id(def_id);
let attrs = self.tcx.hir().attrs(hir_id);
let attrs = self.tcx.hir_attrs(hir_id);
for attr in attrs {
if attr.has_name(sym::rustc_if_this_changed) {
let dep_node_interned = self.argument(attr);