consistently use "next solver" instead of "new solver"
This commit is contained in:
parent
11d16c4082
commit
0947070871
168 changed files with 16 additions and 16 deletions
|
@ -1006,13 +1006,13 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
||||||
// FIXME(-Znext-solver): A bit dubious that we're only registering
|
// FIXME(-Znext-solver): A bit dubious that we're only registering
|
||||||
// predefined opaques in the typeck root.
|
// predefined opaques in the typeck root.
|
||||||
if infcx.next_trait_solver() && !infcx.tcx.is_typeck_child(body.source.def_id()) {
|
if infcx.next_trait_solver() && !infcx.tcx.is_typeck_child(body.source.def_id()) {
|
||||||
checker.register_predefined_opaques_in_new_solver();
|
checker.register_predefined_opaques_for_next_solver();
|
||||||
}
|
}
|
||||||
|
|
||||||
checker
|
checker
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn register_predefined_opaques_in_new_solver(&mut self) {
|
pub(super) fn register_predefined_opaques_for_next_solver(&mut self) {
|
||||||
// OK to use the identity arguments for each opaque type key, since
|
// OK to use the identity arguments for each opaque type key, since
|
||||||
// we remap opaques from HIR typeck back to their definition params.
|
// we remap opaques from HIR typeck back to their definition params.
|
||||||
let opaques: Vec<_> = self
|
let opaques: Vec<_> = self
|
||||||
|
|
|
@ -378,7 +378,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
||||||
//
|
//
|
||||||
// This assert was removed as it did not hold for goals constraining
|
// This assert was removed as it did not hold for goals constraining
|
||||||
// an inference variable to a recursive alias, e.g. in
|
// an inference variable to a recursive alias, e.g. in
|
||||||
// tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs.
|
// tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs.
|
||||||
//
|
//
|
||||||
// Once we have decided on how to handle trait-system-refactor-initiative#75,
|
// Once we have decided on how to handle trait-system-refactor-initiative#75,
|
||||||
// we should re-add an assert here.
|
// we should re-add an assert here.
|
||||||
|
|
|
@ -38,7 +38,7 @@ struct StackEntry<'tcx> {
|
||||||
/// If we were to use that result when later trying to prove another cycle
|
/// If we were to use that result when later trying to prove another cycle
|
||||||
/// participant, we can end up with unstable query results.
|
/// participant, we can end up with unstable query results.
|
||||||
///
|
///
|
||||||
/// See tests/ui/new-solver/coinduction/incompleteness-unstable-result.rs for
|
/// See tests/ui/next-solver/coinduction/incompleteness-unstable-result.rs for
|
||||||
/// an example of where this is needed.
|
/// an example of where this is needed.
|
||||||
cycle_participants: FxHashSet<CanonicalInput<'tcx>>,
|
cycle_participants: FxHashSet<CanonicalInput<'tcx>>,
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ impl<'tcx> SearchGraph<'tcx> {
|
||||||
// in unstable results due to incompleteness.
|
// in unstable results due to incompleteness.
|
||||||
//
|
//
|
||||||
// However, a test for this would be an even more complex version of
|
// However, a test for this would be an even more complex version of
|
||||||
// tests/ui/traits/new-solver/coinduction/incompleteness-unstable-result.rs.
|
// tests/ui/traits/next-solver/coinduction/incompleteness-unstable-result.rs.
|
||||||
// I did not bother to write such a test and we have no regression test
|
// I did not bother to write such a test and we have no regression test
|
||||||
// for this. It would be good to have such a test :)
|
// for this. It would be good to have such a test :)
|
||||||
#[allow(rustc::potential_query_instability)]
|
#[allow(rustc::potential_query_instability)]
|
||||||
|
@ -248,7 +248,7 @@ impl<'tcx> SearchGraph<'tcx> {
|
||||||
// until we reach a fixpoint. It is not enough to simply retry the
|
// until we reach a fixpoint. It is not enough to simply retry the
|
||||||
// `root` goal of this cycle.
|
// `root` goal of this cycle.
|
||||||
//
|
//
|
||||||
// See tests/ui/traits/new-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
|
// See tests/ui/traits/next-solver/cycles/fixpoint-rerun-all-cycle-heads.rs
|
||||||
// for an example.
|
// for an example.
|
||||||
self.stack[stack_depth].has_been_used = true;
|
self.stack[stack_depth].has_been_used = true;
|
||||||
return if let Some(result) = self.stack[stack_depth].provisional_result {
|
return if let Some(result) = self.stack[stack_depth].provisional_result {
|
||||||
|
|
|
@ -26,7 +26,7 @@ impl<'tcx> super::QueryTypeOp<'tcx> for AscribeUserType<'tcx> {
|
||||||
tcx.type_op_ascribe_user_type(canonicalized)
|
tcx.type_op_ascribe_user_type(canonicalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution> {
|
) -> Result<Self::QueryResponse, NoSolution> {
|
||||||
|
|
|
@ -23,7 +23,7 @@ impl<'tcx> super::QueryTypeOp<'tcx> for Eq<'tcx> {
|
||||||
tcx.type_op_eq(canonicalized)
|
tcx.type_op_eq(canonicalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution> {
|
) -> Result<Self::QueryResponse, NoSolution> {
|
||||||
|
|
|
@ -50,7 +50,7 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ImpliedOutlivesBounds<'tcx> {
|
||||||
tcx.implied_outlives_bounds(canonicalized)
|
tcx.implied_outlives_bounds(canonicalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution> {
|
) -> Result<Self::QueryResponse, NoSolution> {
|
||||||
|
|
|
@ -89,7 +89,7 @@ pub trait QueryTypeOp<'tcx>: fmt::Debug + Copy + TypeFoldable<TyCtxt<'tcx>> + 't
|
||||||
/// make sure to feed it predefined opaque types and the defining anchor
|
/// make sure to feed it predefined opaque types and the defining anchor
|
||||||
/// and that would require duplicating all of the tcx queries. Instead,
|
/// and that would require duplicating all of the tcx queries. Instead,
|
||||||
/// just perform these ops locally.
|
/// just perform these ops locally.
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution>;
|
) -> Result<Self::QueryResponse, NoSolution>;
|
||||||
|
@ -149,7 +149,7 @@ where
|
||||||
if infcx.next_trait_solver() {
|
if infcx.next_trait_solver() {
|
||||||
return Ok(scrape_region_constraints(
|
return Ok(scrape_region_constraints(
|
||||||
infcx,
|
infcx,
|
||||||
|ocx| QueryTypeOp::perform_locally_in_new_solver(ocx, self),
|
|ocx| QueryTypeOp::perform_locally_with_next_solver(ocx, self),
|
||||||
"query type op",
|
"query type op",
|
||||||
span,
|
span,
|
||||||
)?
|
)?
|
||||||
|
|
|
@ -25,7 +25,7 @@ where
|
||||||
T::type_op_method(tcx, canonicalized)
|
T::type_op_method(tcx, canonicalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution> {
|
) -> Result<Self::QueryResponse, NoSolution> {
|
||||||
|
|
|
@ -42,7 +42,7 @@ impl<'tcx> super::QueryTypeOp<'tcx> for DropckOutlives<'tcx> {
|
||||||
tcx.dropck_outlives(canonicalized)
|
tcx.dropck_outlives(canonicalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution> {
|
) -> Result<Self::QueryResponse, NoSolution> {
|
||||||
|
|
|
@ -40,7 +40,7 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
|
||||||
tcx.type_op_prove_predicate(canonicalized)
|
tcx.type_op_prove_predicate(canonicalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution> {
|
) -> Result<Self::QueryResponse, NoSolution> {
|
||||||
|
|
|
@ -20,7 +20,7 @@ impl<'tcx> super::QueryTypeOp<'tcx> for Subtype<'tcx> {
|
||||||
tcx.type_op_subtype(canonicalized)
|
tcx.type_op_subtype(canonicalized)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn perform_locally_in_new_solver(
|
fn perform_locally_with_next_solver(
|
||||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||||
key: ParamEnvAnd<'tcx, Self>,
|
key: ParamEnvAnd<'tcx, Self>,
|
||||||
) -> Result<Self::QueryResponse, NoSolution> {
|
) -> Result<Self::QueryResponse, NoSolution> {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue