diff options
| author | bors <bors@rust-lang.org> | 2025-05-24 14:20:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-24 14:20:44 +0000 |
| commit | 038d599eda4fe3e3d78103fba51ee663df86dadf (patch) | |
| tree | 86a65ec8aa8fe52db68793ad107c903371ff0454 /compiler/rustc_next_trait_solver/src/solve | |
| parent | 3de4f1ccf3873782fae2a3883d029ed3d4542581 (diff) | |
| parent | f84ffe29e1b05ce1bdc41b2298c9fcdeacea79f3 (diff) | |
| download | rust-038d599eda4fe3e3d78103fba51ee663df86dadf.tar.gz rust-038d599eda4fe3e3d78103fba51ee663df86dadf.zip | |
Auto merge of #141506 - matthiaskrgr:rollup-80f1geg, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #137323 (Guarantee behavior of transmuting `Option::<T>::None` subject to NPO) - #139254 (std: sys: net: uefi: Implement TCP4 connect) - #141432 (refactor `CanonicalVarKind`) - #141480 (document some -Z flags as living in the rustc-dev-guide) - #141486 (rustdoc book: add argument explanation for `html_playground_url`) - #141496 (Enable `[issue-links]` and `[no-mentions]` in triagebot) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_next_trait_solver/src/solve')
3 files changed, 9 insertions, 8 deletions
diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs index c62f2e2e0e9..455a178595b 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs @@ -360,15 +360,15 @@ where } let var_values = delegate.cx().mk_args_from_iter( - response.variables.iter().enumerate().map(|(index, info)| { - if info.universe() != ty::UniverseIndex::ROOT { + response.variables.iter().enumerate().map(|(index, var_kind)| { + if var_kind.universe() != ty::UniverseIndex::ROOT { // A variable from inside a binder of the query. While ideally these shouldn't // exist at all (see the FIXME at the start of this method), we have to deal with // them for now. - delegate.instantiate_canonical_var_with_infer(info, span, |idx| { + delegate.instantiate_canonical_var_with_infer(var_kind, span, |idx| { prev_universe + idx.index() }) - } else if info.is_existential() { + } else if var_kind.is_existential() { // As an optimization we sometimes avoid creating a new inference variable here. // // All new inference variables we create start out in the current universe of the caller. @@ -379,12 +379,13 @@ where if let Some(v) = opt_values[ty::BoundVar::from_usize(index)] { v } else { - delegate.instantiate_canonical_var_with_infer(info, span, |_| prev_universe) + delegate + .instantiate_canonical_var_with_infer(var_kind, span, |_| prev_universe) } } else { // For placeholders which were already part of the input, we simply map this // universal bound variable back the placeholder of the input. - original_values[info.expect_placeholder_index()] + original_values[var_kind.expect_placeholder_index()] } }), ); diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs index 9a4b95903a9..dfabb94ebfc 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs @@ -91,7 +91,7 @@ where /// The variable info for the `var_values`, only used to make an ambiguous response /// with no constraints. - variables: I::CanonicalVars, + variables: I::CanonicalVarKinds, /// What kind of goal we're currently computing, see the enum definition /// for more info. diff --git a/compiler/rustc_next_trait_solver/src/solve/mod.rs b/compiler/rustc_next_trait_solver/src/solve/mod.rs index 8173146e2fe..2a641807154 100644 --- a/compiler/rustc_next_trait_solver/src/solve/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/mod.rs @@ -354,7 +354,7 @@ where fn response_no_constraints_raw<I: Interner>( cx: I, max_universe: ty::UniverseIndex, - variables: I::CanonicalVars, + variables: I::CanonicalVarKinds, certainty: Certainty, ) -> CanonicalResponse<I> { ty::Canonical { |
