diff options
| author | bors <bors@rust-lang.org> | 2025-08-03 05:26:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-03 05:26:43 +0000 |
| commit | da19b9d24c4ed900b91b45ec7f7795ec43613b1e (patch) | |
| tree | 4f6c6f09b32cbc9e92e1391808e8ba4556afe2ba /compiler/rustc_infer/src/infer/canonical/query_response.rs | |
| parent | 5b9564a18950db64c5aee8ba19d55a97b2e8d1cf (diff) | |
| parent | 64be8bb599d3efa12235e266177c828ad97373e6 (diff) | |
| download | rust-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/canonical/query_response.rs')
| -rw-r--r-- | compiler/rustc_infer/src/infer/canonical/query_response.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_infer/src/infer/canonical/query_response.rs b/compiler/rustc_infer/src/infer/canonical/query_response.rs index d92f4c2444b..09578598114 100644 --- a/compiler/rustc_infer/src/infer/canonical/query_response.rs +++ b/compiler/rustc_infer/src/infer/canonical/query_response.rs @@ -430,12 +430,12 @@ impl<'tcx> InferCtxt<'tcx> { } GenericArgKind::Lifetime(result_value) => { // e.g., here `result_value` might be `'?1` in the example above... - if let ty::ReBound(debruijn, br) = result_value.kind() { + if let ty::ReBound(debruijn, b) = result_value.kind() { // ... in which case we would set `canonical_vars[0]` to `Some('static)`. // We only allow a `ty::INNERMOST` index in generic parameters. assert_eq!(debruijn, ty::INNERMOST); - opt_values[br.var] = Some(*original_value); + opt_values[b.var] = Some(*original_value); } } GenericArgKind::Const(result_value) => { @@ -444,7 +444,7 @@ impl<'tcx> InferCtxt<'tcx> { // We only allow a `ty::INNERMOST` index in generic parameters. assert_eq!(debruijn, ty::INNERMOST); - opt_values[b] = Some(*original_value); + opt_values[b.var] = Some(*original_value); } } } |
