Skip to content

Commit 42289ff

Browse files
committed
Inline impl_wf_check.
1 parent 9ae2546 commit 42289ff

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

compiler/rustc_typeck/src/impl_wf_check.rs

-7
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ mod min_specialization;
5454
/// impl<'a> Trait<Foo> for Bar { type X = &'a i32; }
5555
/// // ^ 'a is unused and appears in assoc type, error
5656
/// ```
57-
pub fn impl_wf_check(tcx: TyCtxt<'_>) {
58-
// We will tag this as part of the WF check -- logically, it is,
59-
// but it's one that we must perform earlier than the rest of
60-
// WfCheck.
61-
tcx.hir().for_each_module(|module| tcx.ensure().check_mod_impl_wf(module))
62-
}
63-
6457
fn check_mod_impl_wf(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
6558
let min_specialization = tcx.features().min_specialization;
6659
let module = tcx.hir_module_items(module_def_id);

compiler/rustc_typeck/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,9 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
509509
}
510510

511511
tcx.sess.track_errors(|| {
512-
tcx.sess.time("impl_wf_inference", || impl_wf_check::impl_wf_check(tcx));
512+
tcx.sess.time("impl_wf_inference", || {
513+
tcx.hir().for_each_module(|module| tcx.ensure().check_mod_impl_wf(module))
514+
});
513515
})?;
514516

515517
tcx.sess.track_errors(|| {

0 commit comments

Comments
 (0)