diff options
| author | bors <bors@rust-lang.org> | 2025-03-24 01:03:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-24 01:03:21 +0000 |
| commit | ae8ab87de4d8caab5d91a027bc19bb5d5e8a3691 (patch) | |
| tree | a96cd1131d237664ee96e872d0fe2aeab2abc5c0 /compiler/rustc_trait_selection/src/solve | |
| parent | 7290b04b0a46de2118968aa556bfc0970aac6661 (diff) | |
| parent | 0e95f962d9718a7680ad8c10aa747a120da9ed5b (diff) | |
| download | rust-ae8ab87de4d8caab5d91a027bc19bb5d5e8a3691.tar.gz rust-ae8ab87de4d8caab5d91a027bc19bb5d5e8a3691.zip | |
Auto merge of #138873 - jhpratt:rollup-tggrbxl, r=jhpratt
Rollup of 10 pull requests Successful merges: - #137593 (fix download-llvm logic for subtree sync branches) - #137736 (Don't attempt to export compiler-builtins symbols from rust dylibs) - #138135 (Simplify `PartialOrd` on tuples containing primitives) - #138321 ([bootstrap] Distribute split debuginfo if present) - #138574 (rustdoc: be more strict about "Methods from Deref") - #138606 (Fix missing rustfmt in msi installer - cont) - #138671 (Fix `FileType` `PartialEq` implementation on Windows) - #138728 (Update `compiler-builtins` to 0.1.152) - #138783 (Cache current_dll_path output) - #138846 (Tweaks to writeback and `Obligation -> Goal` conversion) Failed merges: - #138755 ([rustdoc] Remove duplicated loop when computing doc cfgs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
3 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs index af5a60027ba..3d9a90eb74e 100644 --- a/compiler/rustc_trait_selection/src/solve/delegate.rs +++ b/compiler/rustc_trait_selection/src/solve/delegate.rs @@ -96,7 +96,7 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate< ) -> Option<Vec<Goal<'tcx, ty::Predicate<'tcx>>>> { crate::traits::wf::unnormalized_obligations(&self.0, param_env, arg, DUMMY_SP, CRATE_DEF_ID) .map(|obligations| { - obligations.into_iter().map(|obligation| obligation.into()).collect() + obligations.into_iter().map(|obligation| obligation.as_goal()).collect() }) } diff --git a/compiler/rustc_trait_selection/src/solve/fulfill.rs b/compiler/rustc_trait_selection/src/solve/fulfill.rs index 704ba6e501d..192e632a2d5 100644 --- a/compiler/rustc_trait_selection/src/solve/fulfill.rs +++ b/compiler/rustc_trait_selection/src/solve/fulfill.rs @@ -80,7 +80,7 @@ impl<'tcx> ObligationStorage<'tcx> { // change. // FIXME: <https://github.com/Gankra/thin-vec/pull/66> is merged, this can be removed. self.overflowed.extend(ExtractIf::new(&mut self.pending, |o| { - let goal = o.clone().into(); + let goal = o.as_goal(); let result = <&SolverDelegate<'tcx>>::from(infcx) .evaluate_root_goal(goal, GenerateProofTree::No, o.cause.span) .0; @@ -161,7 +161,7 @@ where let mut has_changed = false; for obligation in self.obligations.unstalled_for_select() { - let goal = obligation.clone().into(); + let goal = obligation.as_goal(); let result = <&SolverDelegate<'tcx>>::from(infcx) .evaluate_root_goal(goal, GenerateProofTree::No, obligation.cause.span) .0; diff --git a/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs b/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs index 352ac7c1a4e..3a939df25e0 100644 --- a/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs +++ b/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs @@ -10,7 +10,7 @@ use rustc_middle::ty::error::{ExpectedFound, TypeError}; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_middle::{bug, span_bug}; use rustc_next_trait_solver::solve::{GenerateProofTree, SolverDelegateEvalExt as _}; -use rustc_type_ir::solve::{Goal, NoSolution}; +use rustc_type_ir::solve::NoSolution; use tracing::{instrument, trace}; use crate::solve::Certainty; @@ -89,7 +89,7 @@ pub(super) fn fulfillment_error_for_stalled<'tcx>( let (code, refine_obligation) = infcx.probe(|_| { match <&SolverDelegate<'tcx>>::from(infcx) .evaluate_root_goal( - root_obligation.clone().into(), + root_obligation.as_goal(), GenerateProofTree::No, root_obligation.cause.span, ) @@ -155,7 +155,7 @@ fn find_best_leaf_obligation<'tcx>( .fudge_inference_if_ok(|| { infcx .visit_proof_tree( - obligation.clone().into(), + obligation.as_goal(), &mut BestObligation { obligation: obligation.clone(), consider_ambiguities }, ) .break_value() @@ -245,7 +245,7 @@ impl<'tcx> BestObligation<'tcx> { { let nested_goal = candidate.instantiate_proof_tree_for_nested_goal( GoalSource::Misc, - Goal::new(infcx.tcx, obligation.param_env, obligation.predicate), + obligation.as_goal(), self.span(), ); // Skip nested goals that aren't the *reason* for our goal's failure. |
