Skip to content

Commit 9896de4

Browse files
committed
Remove a now-resolved hack
1 parent 80d8270 commit 9896de4

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

compiler/rustc_hir_analysis/src/impl_wf_check.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,7 @@ fn enforce_impl_params_are_constrained(
6969
) -> Result<(), ErrorGuaranteed> {
7070
// Every lifetime used in an associated type must be constrained.
7171
let impl_self_ty = tcx.type_of(impl_def_id).instantiate_identity();
72-
if impl_self_ty.references_error() {
73-
// Don't complain about unconstrained type params when self ty isn't known due to errors.
74-
// (#36836)
75-
tcx.dcx().span_delayed_bug(
76-
tcx.def_span(impl_def_id),
77-
format!(
78-
"potentially unconstrained type parameters weren't evaluated: {impl_self_ty:?}",
79-
),
80-
);
81-
// This is super fishy, but our current `rustc_hir_analysis::check_crate` pipeline depends on
82-
// `type_of` having been called much earlier, and thus this value being read from cache.
83-
// Compilation must continue in order for other important diagnostics to keep showing up.
84-
return Ok(());
85-
}
72+
impl_self_ty.error_reported()?;
8673
let impl_generics = tcx.generics_of(impl_def_id);
8774
let impl_predicates = tcx.predicates_of(impl_def_id);
8875
let impl_trait_ref = tcx.impl_trait_ref(impl_def_id).map(ty::EarlyBinder::instantiate_identity);

0 commit comments

Comments
 (0)