about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-09-12 23:47:47 +0200
committerRalf Jung <post@ralfj.de>2023-09-13 07:29:34 +0200
commit11a4a24d8e8d682f06773db8ef5eba20d7b81887 (patch)
tree162392eac46be62ca97ddadb398a3151595c02cd /compiler/rustc_trait_selection/src
parent6e4779ab1775d0901408c08d64dc12c735069701 (diff)
downloadrust-11a4a24d8e8d682f06773db8ef5eba20d7b81887.tar.gz
rust-11a4a24d8e8d682f06773db8ef5eba20d7b81887.zip
make the set of methods between our two Const types more consistent
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
index 0e73bad1918..fe71a9f07df 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
@@ -257,7 +257,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
             // Arrays give us `[]`, `[{ty}; _]` and `[{ty}; N]`
             if let ty::Array(aty, len) = self_ty.kind() {
                 flags.push((sym::_Self, Some("[]".to_string())));
-                let len = len.try_to_value().and_then(|v| v.try_to_target_usize(self.tcx));
+                let len = len.try_to_valtree().and_then(|v| v.try_to_target_usize(self.tcx));
                 flags.push((sym::_Self, Some(format!("[{aty}; _]"))));
                 if let Some(n) = len {
                     flags.push((sym::_Self, Some(format!("[{aty}; {n}]"))));