Move methods from Map
to TyCtxt
, part 2.
Continuing the work started in #136466. Every method gains a `hir_` prefix, though for the ones that already have a `par_` or `try_par_` prefix I added the `hir_` after that.
This commit is contained in:
parent
ce36a966c7
commit
fd7b4bf4e1
108 changed files with 314 additions and 346 deletions
|
@ -166,7 +166,7 @@ fn suggest_question_mark<'tcx>(
|
|||
let (infcx, param_env) = cx.tcx.infer_ctxt().build_with_typing_env(cx.typing_env());
|
||||
let ocx = ObligationCtxt::new(&infcx);
|
||||
|
||||
let body_def_id = cx.tcx.hir().body_owner_def_id(body_id);
|
||||
let body_def_id = cx.tcx.hir_body_owner_def_id(body_id);
|
||||
let cause =
|
||||
ObligationCause::new(span, body_def_id, rustc_infer::traits::ObligationCauseCode::Misc);
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ fn late_lint_mod_inner<'tcx, T: LateLintPass<'tcx>>(
|
|||
) {
|
||||
let mut cx = LateContextAndPass { context, pass };
|
||||
|
||||
let (module, _span, hir_id) = tcx.hir().get_module(module_def_id);
|
||||
let (module, _span, hir_id) = tcx.hir_get_module(module_def_id);
|
||||
|
||||
cx.with_lint_attrs(hir_id, |cx| {
|
||||
// There is no module lint that will have the crate itself as an item, so check it here.
|
||||
|
@ -445,7 +445,7 @@ fn late_lint_crate_inner<'tcx, T: LateLintPass<'tcx>>(
|
|||
// Since the root module isn't visited as an item (because it isn't an
|
||||
// item), warn for it here.
|
||||
lint_callback!(cx, check_crate,);
|
||||
tcx.hir().walk_toplevel_module(cx);
|
||||
tcx.hir_walk_toplevel_module(cx);
|
||||
lint_callback!(cx, check_crate_post,);
|
||||
})
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ pub fn check_crate<'tcx>(tcx: TyCtxt<'tcx>) {
|
|||
|| {
|
||||
tcx.sess.time("module_lints", || {
|
||||
// Run per-module lints
|
||||
tcx.hir().par_for_each_module(|module| tcx.ensure_ok().lint_mod(module));
|
||||
tcx.par_hir_for_each_module(|module| tcx.ensure_ok().lint_mod(module));
|
||||
});
|
||||
},
|
||||
);
|
||||
|
|
|
@ -144,7 +144,7 @@ fn lints_that_dont_need_to_run(tcx: TyCtxt<'_>, (): ()) -> FxIndexSet<LintId> {
|
|||
|
||||
let mut visitor = LintLevelMaximum { tcx, dont_need_to_run };
|
||||
visitor.process_opts();
|
||||
tcx.hir().walk_attributes(&mut visitor);
|
||||
tcx.hir_walk_attributes(&mut visitor);
|
||||
|
||||
visitor.dont_need_to_run
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue