We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a517049 commit 6672b86Copy full SHA for 6672b86
compiler/rustc_hir_typeck/src/generator_interior/mod.rs
@@ -643,15 +643,15 @@ fn check_must_not_suspend_ty<'tcx>(
643
}
644
ty::Array(ty, len) => {
645
let descr_pre = &format!("{}array{} of ", data.descr_pre, plural_suffix);
646
+ let target_usize = len.try_eval_target_usize(fcx.tcx, fcx.param_env).unwrap_or(0) as usize;
647
+ let plural_len = target_usize.saturating_add(1);
648
check_must_not_suspend_ty(
649
fcx,
650
ty,
651
hir_id,
652
SuspendCheckData {
653
descr_pre,
- plural_len: len.try_eval_target_usize(fcx.tcx, fcx.param_env).unwrap_or(0)
- as usize
654
- + 1,
+ plural_len,
655
..data
656
},
657
)
0 commit comments