Don't call try_eval_target_usize in error reporting
This commit is contained in:
parent
8f579497f7
commit
01d19d7be9
@ -4621,7 +4621,7 @@ pub fn ty_kind_suggestion(
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user