mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Don't call try_eval_target_usize in error reporting
This commit is contained in:
parent
8f579497f7
commit
01d19d7be9
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user