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

@@ -48,7 +48,7 @@ impl<'tcx, T: LateLintPass<'tcx>> LateContextAndPass<'tcx, T> {
where
F: FnOnce(&mut Self),
{
let attrs = self.context.tcx.hir().attrs(id);
let attrs = self.context.tcx.hir_attrs(id);
let prev = self.context.last_node_with_lint_attrs;
self.context.last_node_with_lint_attrs = id;
debug!("late context: enter_attrs({:?})", attrs);