Skip to content

Commit 01d19d7

Browse files
Don't call try_eval_target_usize in error reporting
1 parent 8f57949 commit 01d19d7

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_trait_selection/src/error_reporting/traits

1 file changed

+1
-1
lines changed

compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4621,7 +4621,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
46214621
format!("&{}{ty}", mutability.prefix_str())
46224622
}
46234623
}
4624-
ty::Array(ty, len) if let Some(len) = len.try_eval_target_usize(tcx, param_env) => {
4624+
ty::Array(ty, len) if let Some(len) = len.try_to_target_usize(tcx) => {
46254625
if len == 0 {
46264626
"[]".to_string()
46274627
} else if self.type_is_copy_modulo_regions(param_env, ty) || len == 1 {

0 commit comments

Comments
 (0)