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