Rename coroutine_stalled_predicates

This commit is contained in:
Michael Goulet 2024-04-15 19:00:47 -04:00
parent ccfcd950b3
commit aa1653e5be
4 changed files with 8 additions and 8 deletions

View File

@ -1552,8 +1552,8 @@ pub(super) fn check_coroutine_obligations(
let typeck = tcx.typeck(def_id);
let param_env = tcx.param_env(typeck.hir_owner.def_id);
let coroutine_interior_predicates = &typeck.coroutine_interior_predicates[&def_id];
debug!(?coroutine_interior_predicates);
let coroutine_stalled_predicates = &typeck.coroutine_stalled_predicates[&def_id];
debug!(?coroutine_stalled_predicates);
let infcx = tcx
.infer_ctxt()
@ -1566,7 +1566,7 @@ pub(super) fn check_coroutine_obligations(
.build();
let mut fulfillment_cx = <dyn TraitEngine<'_>>::new(&infcx);
for (predicate, cause) in coroutine_interior_predicates {
for (predicate, cause) in coroutine_stalled_predicates {
let obligation = Obligation::new(tcx, cause.clone(), param_env, *predicate);
fulfillment_cx.register_predicate_obligation(&infcx, obligation);
}

View File

@ -579,7 +579,7 @@ pub(in super::super) fn resolve_coroutine_interiors(&self) {
debug!(?obligations);
self.typeck_results
.borrow_mut()
.coroutine_interior_predicates
.coroutine_stalled_predicates
.insert(expr_def_id, obligations);
}
}

View File

@ -552,11 +552,11 @@ fn visit_coroutine_interior(&mut self) {
assert_eq!(fcx_typeck_results.hir_owner, self.typeck_results.hir_owner);
self.tcx().with_stable_hashing_context(move |ref hcx| {
for (&expr_def_id, predicates) in
fcx_typeck_results.coroutine_interior_predicates.to_sorted(hcx, false).into_iter()
fcx_typeck_results.coroutine_stalled_predicates.to_sorted(hcx, false).into_iter()
{
let predicates =
self.resolve(predicates.clone(), &self.fcx.tcx.def_span(expr_def_id));
self.typeck_results.coroutine_interior_predicates.insert(expr_def_id, predicates);
self.typeck_results.coroutine_stalled_predicates.insert(expr_def_id, predicates);
}
})
}

View File

@ -201,7 +201,7 @@ pub struct TypeckResults<'tcx> {
/// Stores the predicates that apply on coroutine witness types.
/// formatting modified file tests/ui/coroutine/retain-resume-ref.rs
pub coroutine_interior_predicates:
pub coroutine_stalled_predicates:
LocalDefIdMap<Vec<(ty::Predicate<'tcx>, ObligationCause<'tcx>)>>,
/// We sometimes treat byte string literals (which are of type `&[u8; N]`)
@ -243,7 +243,7 @@ pub fn new(hir_owner: OwnerId) -> TypeckResults<'tcx> {
closure_min_captures: Default::default(),
closure_fake_reads: Default::default(),
rvalue_scopes: Default::default(),
coroutine_interior_predicates: Default::default(),
coroutine_stalled_predicates: Default::default(),
treat_byte_string_as_slice: Default::default(),
closure_size_eval: Default::default(),
offset_of_data: Default::default(),