about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/infer/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-03 05:26:43 +0000
committerbors <bors@rust-lang.org>2025-08-03 05:26:43 +0000
commitda19b9d24c4ed900b91b45ec7f7795ec43613b1e (patch)
tree4f6c6f09b32cbc9e92e1391808e8ba4556afe2ba /compiler/rustc_infer/src/infer/mod.rs
parent5b9564a18950db64c5aee8ba19d55a97b2e8d1cf (diff)
parent64be8bb599d3efa12235e266177c828ad97373e6 (diff)
downloadrust-da19b9d24c4ed900b91b45ec7f7795ec43613b1e.tar.gz
rust-da19b9d24c4ed900b91b45ec7f7795ec43613b1e.zip
Auto merge of #144677 - nnethercote:bound-const-handling, r=lcnr
Improve bound const handling

A few changes to make const handling more similar to type handling.

r? `@compiler-errors` -errors
Diffstat (limited to 'compiler/rustc_infer/src/infer/mod.rs')
-rw-r--r--compiler/rustc_infer/src/infer/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs
index 5bbd8a84b7f..7379df7c7c7 100644
--- a/compiler/rustc_infer/src/infer/mod.rs
+++ b/compiler/rustc_infer/src/infer/mod.rs
@@ -1265,8 +1265,8 @@ impl<'tcx> InferCtxt<'tcx> {
             fn replace_ty(&mut self, bt: ty::BoundTy) -> Ty<'tcx> {
                 self.args[bt.var.index()].expect_ty()
             }
-            fn replace_const(&mut self, bv: ty::BoundVar) -> ty::Const<'tcx> {
-                self.args[bv.index()].expect_const()
+            fn replace_const(&mut self, bc: ty::BoundConst) -> ty::Const<'tcx> {
+                self.args[bc.var.index()].expect_const()
             }
         }
         let delegate = ToFreshVars { args };