Skip to content

Commit 77a00bd

Browse files
committed
rename fully_resolve to deeply_resolve_and_assert_fully_resolved
1 parent 6a7812f commit 77a00bd

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
708708

709709
let mut remapped_types = DefIdMap::default();
710710
for (def_id, (ty, args)) in collected_types {
711-
match infcx.fully_resolve(ty) {
711+
match infcx.deeply_resolve_and_assert_fully_resolved(ty) {
712712
Ok(ty) => {
713713
// `ty` contains free regions that we created earlier while liberating the
714714
// trait fn signature. However, projection normalization expects `ty` to

compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ pub(crate) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
189189
return;
190190
}
191191
// Resolve any lifetime variables that may have been introduced during normalization.
192-
let Ok((trait_bounds, impl_bounds)) = infcx.fully_resolve((trait_bounds, impl_bounds)) else {
192+
let Ok((trait_bounds, impl_bounds)) =
193+
infcx.deeply_resolve_and_assert_fully_resolved((trait_bounds, impl_bounds))
194+
else {
193195
// If resolution didn't fully complete, we cannot continue checking RPITIT refinement, and
194196
// delay a bug as the original code contains load-bearing errors.
195197
tcx.dcx().delayed_bug("encountered errors when checking RPITIT refinement (resolution)");

compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn get_impl_args(
191191

192192
let assumed_wf_types = ocx.assumed_wf_types_and_report_errors(param_env, impl1_def_id)?;
193193
ocx.resolve_regions_and_report_errors(impl1_def_id, param_env, assumed_wf_types)?;
194-
let Ok(impl2_args) = infcx.fully_resolve(impl2_args) else {
194+
let Ok(impl2_args) = infcx.deeply_resolve_and_assert_fully_resolved(impl2_args) else {
195195
let span = tcx.def_span(impl1_def_id);
196196
let guar = tcx.dcx().emit_err(GenericArgsOnOverriddenImpl { span });
197197
return Err(guar);

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,10 @@ impl<'tcx> InferCtxt<'tcx> {
14881488
///
14891489
/// This method is idempotent, but it not typically not invoked
14901490
/// except during the writeback phase.
1491-
pub fn fully_resolve<T: TypeFoldable<TyCtxt<'tcx>>>(&self, value: T) -> FixupResult<T> {
1491+
pub fn deeply_resolve_and_assert_fully_resolved<T: TypeFoldable<TyCtxt<'tcx>>>(
1492+
&self,
1493+
value: T,
1494+
) -> FixupResult<T> {
14921495
match resolve::fully_resolve(self, value) {
14931496
Ok(value) => {
14941497
if value.has_non_region_infer() {

compiler/rustc_trait_selection/src/traits/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ fn do_normalize_clauses<'tcx>(
406406
// caller sites. We should also avoid cloning if possible.
407407
let normalized_env = ty::ParamEnv::new(tcx, clauses.iter().copied());
408408
let _errors = infcx.resolve_regions(cause.body_def_id, normalized_env, []);
409-
match infcx.fully_resolve(clauses.clone()) {
409+
match infcx.deeply_resolve_and_assert_fully_resolved(clauses.clone()) {
410410
Ok(clauses) => clauses,
411411
Err(fixup_err) => {
412412
// The first folder only replaces infers from normalization failure. We might not have

0 commit comments

Comments
 (0)