File tree 1 file changed +5
-3
lines changed
compiler/rustc_middle/src/ty 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -421,12 +421,14 @@ pub fn super_relate_tys<R: TypeRelation<'tcx>>(
421
421
let t = relation. relate ( a_t, b_t) ?;
422
422
match relation. relate ( sz_a, sz_b) {
423
423
Ok ( sz) => Ok ( tcx. mk_ty ( ty:: Array ( t, sz) ) ) ,
424
- // FIXME(#72219) Implement improved diagnostics for mismatched array
425
- // length?
426
- Err ( err) if relation. tcx ( ) . lazy_normalization ( ) => Err ( err) ,
427
424
Err ( err) => {
428
425
// Check whether the lengths are both concrete/known values,
429
426
// but are unequal, for better diagnostics.
427
+ //
428
+ // It might seem dubious to eagerly evaluate these constants here,
429
+ // we however cannot end up with errors in `Relate` during both
430
+ // `type_of` and `predicates_of`. This means that evaluating the
431
+ // constants should not cause cycle errors here.
430
432
let sz_a = sz_a. try_eval_usize ( tcx, relation. param_env ( ) ) ;
431
433
let sz_b = sz_b. try_eval_usize ( tcx, relation. param_env ( ) ) ;
432
434
match ( sz_a, sz_b) {
You can’t perform that action at this time.
0 commit comments