File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -425,7 +425,8 @@ memoize!(
425
425
426
426
ty:: Array ( elem_ty, size) => {
427
427
let size = size
428
- . try_eval_target_usize( cx. tcx, param_env)
428
+ . normalize_internal( cx. tcx, param_env)
429
+ . try_to_target_usize( cx. tcx)
429
430
. ok_or( Error :: TooGeneric ) ;
430
431
if size == Ok ( 0 ) {
431
432
return Ok ( 0 ) ;
Original file line number Diff line number Diff line change @@ -425,7 +425,8 @@ impl<'tcx> AnalysisCtxt<'tcx> {
425
425
426
426
let elem_adj = self . drop_adjustment ( param_and_elem_ty) ?;
427
427
let size = size
428
- . try_eval_target_usize ( self . tcx , param_env)
428
+ . normalize_internal ( self . tcx , param_env)
429
+ . try_to_target_usize ( self . tcx )
429
430
. ok_or ( Error :: TooGeneric ) ?;
430
431
let Ok ( size) = i32:: try_from ( size) else {
431
432
return Ok ( ( ) ) ;
@@ -743,7 +744,8 @@ memoize!(
743
744
744
745
ty:: Array ( elem_ty, size) => {
745
746
let size = size
746
- . try_eval_target_usize( cx. tcx, param_env)
747
+ . normalize_internal( cx. tcx, param_env)
748
+ . try_to_target_usize( cx. tcx)
747
749
. ok_or( Error :: TooGeneric ) ;
748
750
if size == Ok ( 0 ) {
749
751
return Ok ( ExpectationRange :: top( ) ) ;
You can’t perform that action at this time.
0 commit comments