Skip to content

Commit

Permalink
Don't call try_eval_target_usize in error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Sep 22, 2024
1 parent 8f57949 commit 01d19d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4621,7 +4621,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
format!("&{}{ty}", mutability.prefix_str())
}
}
ty::Array(ty, len) if let Some(len) = len.try_eval_target_usize(tcx, param_env) => {
ty::Array(ty, len) if let Some(len) = len.try_to_target_usize(tcx) => {
if len == 0 {
"[]".to_string()
} else if self.type_is_copy_modulo_regions(param_env, ty) || len == 1 {
Expand Down

0 comments on commit 01d19d7

Please sign in to comment.