Skip to content

Commit 8d73661

Browse files
committed
Remove some stuff we don't need or can't use anymore
1 parent 49781db commit 8d73661

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

compiler/rustc_borrowck/src/nll.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,14 @@ pub(crate) fn compute_regions<'a, 'tcx>(
122122
// base constraints generated by the type-check.
123123
let var_origins = infcx.get_region_var_origins();
124124
let MirTypeckRegionConstraints {
125-
placeholder_indices,
125+
placeholder_indices: _,
126126
placeholder_index_to_region: _,
127127
liveness_constraints,
128128
mut outlives_constraints,
129129
mut member_constraints,
130130
universe_causes,
131131
type_tests,
132132
} = constraints;
133-
let placeholder_indices = Rc::new(placeholder_indices);
134133

135134
// If requested, emit legacy polonius facts.
136135
polonius::emit_facts(
@@ -158,7 +157,6 @@ pub(crate) fn compute_regions<'a, 'tcx>(
158157
infcx,
159158
var_origins,
160159
universal_regions,
161-
placeholder_indices,
162160
universal_region_relations,
163161
outlives_constraints,
164162
member_constraints,

compiler/rustc_borrowck/src/region_infer/mod.rs

-5
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
494494
infcx: &BorrowckInferCtxt<'tcx>,
495495
var_infos: VarInfos,
496496
universal_regions: Rc<UniversalRegions<'tcx>>,
497-
placeholder_indices: Rc<PlaceholderIndices>,
498497
universal_region_relations: Frozen<UniversalRegionRelations<'tcx>>,
499498
mut outlives_constraints: OutlivesConstraintSet<'tcx>,
500499
member_constraints_in: MemberConstraintSet<'tcx, RegionVid>,
@@ -505,7 +504,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
505504
) -> Self {
506505
debug!("universal_regions: {:#?}", universal_regions);
507506
debug!("outlives constraints: {:#?}", outlives_constraints);
508-
debug!("placeholder_indices: {:#?}", placeholder_indices);
509507
debug!("type tests: {:#?}", type_tests);
510508

511509
// Create a RegionDefinition for each inference variable.
@@ -1673,9 +1671,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
16731671
debug!(
16741672
"check_bound_universal_region, error_element: {error_element:?} for placeholder {placeholder:?} in scc: {longer_fr_scc:?}"
16751673
);
1676-
match error_element {
1677-
RegionElement::Location(_) | RegionElement::RootUniversalRegion(_) => {}
1678-
}
16791674

16801675
errors_buffer.push(RegionErrorKind::BoundUniversalRegionError {
16811676
longer_fr,

compiler/rustc_borrowck/src/region_infer/opaque_types.rs

+6-12
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
213213

214214
// Special handling of higher-ranked regions.
215215
if !self.scc_universe(scc).is_root() {
216-
if self
217-
.constraint_sccs
218-
.annotation(scc)
219-
.placeholder_representative()
220-
.is_some_and(|scc_placeholder| vid == scc_placeholder)
221-
{
222-
// FIXME: somehow construct the right type out of the representative!
223-
return region;
224-
} else {
225-
// Fallback: this will produce a cryptic error message.
226-
return region;
227-
}
216+
// FIXME: the original logic was: if this SCC contains one single
217+
// placeholder, equal to vid, then construct a
218+
// ty::Region::new_placeholder out of it, somehow. This no longer
219+
// works as an approach, since we cannot get the prerequisite indices.
220+
debug!("Cannot get a nice name for higher-ranked region {vid:?} as {region:?}");
221+
return region;
228222
}
229223

230224
// Find something that we can name

0 commit comments

Comments
 (0)