File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 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>>(
421421 let t = relation. relate ( a_t, b_t) ?;
422422 match relation. relate ( sz_a, sz_b) {
423423 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) ,
427424 Err ( err) => {
428425 // Check whether the lengths are both concrete/known values,
429426 // 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.
430432 let sz_a = sz_a. try_eval_usize ( tcx, relation. param_env ( ) ) ;
431433 let sz_b = sz_b. try_eval_usize ( tcx, relation. param_env ( ) ) ;
432434 match ( sz_a, sz_b) {
You can’t perform that action at this time.
0 commit comments