Skip to content

Commit 38c204b

Browse files
committed
WIP
1 parent 5e9fc00 commit 38c204b

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

compiler/rustc_borrowck/src/handle_placeholders.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::constraints::{ConstraintSccIndex, OutlivesConstraintSet};
2020
use crate::consumers::OutlivesConstraint;
2121
use crate::diagnostics::{RegionErrorKind, RegionErrors, UniverseInfo};
2222
use crate::member_constraints::MemberConstraintSet;
23-
use crate::region_infer::values::{LivenessValues, PlaceholderIndices};
23+
use crate::region_infer::values::LivenessValues;
2424
use crate::region_infer::{ConstraintSccs, RegionDefinition, Representative, TypeTest};
2525
use crate::ty::VarianceDiagInfo;
2626
use crate::type_check::free_region_relations::UniversalRegionRelations;
@@ -39,7 +39,6 @@ pub(crate) struct LoweredConstraints<'tcx> {
3939
pub(crate) type_tests: Vec<TypeTest<'tcx>>,
4040
pub(crate) liveness_constraints: LivenessValues,
4141
pub(crate) universe_causes: FxIndexMap<UniverseIndex, UniverseInfo<'tcx>>,
42-
pub(crate) placeholder_indices: PlaceholderIndices,
4342
}
4443

4544
impl<'d, 'tcx, A: scc::Annotation> SccAnnotations<'d, 'tcx, A> {
@@ -340,7 +339,7 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
340339
let (definitions, has_placeholders) = region_definitions(universal_regions, infcx);
341340

342341
let MirTypeckRegionConstraints {
343-
placeholder_indices,
342+
placeholder_indices: _,
344343
placeholder_index_to_region: _,
345344
liveness_constraints,
346345
mut outlives_constraints,
@@ -388,7 +387,6 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
388387
outlives_constraints: Frozen::freeze(outlives_constraints),
389388
liveness_constraints,
390389
universe_causes,
391-
placeholder_indices,
392390
};
393391
}
394392
debug!("Placeholders present; activating placeholder handling logic!");
@@ -431,7 +429,6 @@ pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
431429
type_tests,
432430
liveness_constraints,
433431
universe_causes,
434-
placeholder_indices,
435432
}
436433
}
437434

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
362362
type_tests,
363363
mut liveness_constraints,
364364
universe_causes,
365-
placeholder_indices,
366365
member_constraints,
367366
} = lowered_constraints;
368367

369368
debug!("universal_regions: {:#?}", universal_region_relations.universal_regions);
370369
debug!("outlives constraints: {:#?}", outlives_constraints);
371-
debug!("placeholder_indices: {:#?}", placeholder_indices);
372370
debug!("type tests: {:#?}", type_tests);
373371

374372
let constraint_graph = Frozen::freeze(outlives_constraints.graph(definitions.len()));

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,14 @@ pub(crate) struct MirTypeckResults<'tcx> {
238238
pub(crate) struct MirTypeckRegionConstraints<'tcx> {
239239
/// Maps from a `ty::Placeholder` to the corresponding
240240
/// `PlaceholderIndex` bit that we will use for it.
241-
///
242-
/// To keep everything in sync, do not insert this set
243-
/// directly. Instead, use the `placeholder_region` helper.
244-
pub(crate) placeholder_indices: PlaceholderIndices,
241+
pub placeholder_indices: PlaceholderIndices,
245242

246243
/// Each time we add a placeholder to `placeholder_indices`, we
247244
/// also create a corresponding "representative" region vid for
248245
/// that wraps it. This vector tracks those. This way, when we
249246
/// convert the same `ty::RePlaceholder(p)` twice, we can map to
250247
/// the same underlying `RegionVid`.
251-
pub(crate) placeholder_index_to_region: IndexVec<PlaceholderIndex, ty::Region<'tcx>>,
248+
pub placeholder_index_to_region: IndexVec<PlaceholderIndex, ty::Region<'tcx>>,
252249

253250
/// In general, the type-checker is not responsible for enforcing
254251
/// liveness constraints; this job falls to the region inferencer,

0 commit comments

Comments
 (0)