diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-22 13:52:58 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-22 13:55:06 -0400 |
| commit | 01d19d7be9b1fdcaa93eef4317c46f7330093061 (patch) | |
| tree | d994d44648134f66e72bbcbabb85dc0f0a81e9d0 | |
| parent | 8f579497f7578de85dd33d585c1818e1a6d3176a (diff) | |
| download | rust-01d19d7be9b1fdcaa93eef4317c46f7330093061.tar.gz rust-01d19d7be9b1fdcaa93eef4317c46f7330093061.zip | |
Don't call try_eval_target_usize in error reporting
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index e2796c76412..89b37fd6415 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -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 { |
