Skip to content

Commit 61f7324

Browse files
amandasystemslcnr
andcommitted
More code review (will squash later)
Co-authored-by: lcnr <[email protected]>
1 parent a3ad107 commit 61f7324

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

compiler/rustc_borrowck/src/eliminate_placeholders.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
//! Logic for lowering higher-kinded outlives constraints
22
//! (with placeholders and universes) and turn them into regular
33
//! outlives constraints.
4-
//!
5-
//! This logic is provisional and should be removed once the trait
6-
//! solver can handle this kind of constraint.
4+
75
use rustc_data_structures::frozen::Frozen;
86
use rustc_data_structures::fx::FxIndexMap;
97
use rustc_data_structures::graph::scc;
@@ -197,7 +195,7 @@ fn region_definitions<'tcx>(
197195
/// This code is a stop-gap measure in preparation for the future trait solver.
198196
///
199197
/// Every constraint added by this method is an internal `IllegalUniverse` constraint.
200-
pub(crate) fn rewrite_higher_kinded_outlives_as_constraints<'tcx>(
198+
pub(crate) fn compute_sccs_applying_placeholder_outlives_constraints<'tcx>(
201199
constraints: MirTypeckRegionConstraints<'tcx>,
202200
universal_region_relations: &Frozen<UniversalRegionRelations<'tcx>>,
203201
infcx: &BorrowckInferCtxt<'tcx>,

compiler/rustc_borrowck/src/nll.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use tracing::{debug, instrument};
2222
use crate::borrow_set::BorrowSet;
2323
use crate::consumers::ConsumerOptions;
2424
use crate::diagnostics::RegionErrors;
25-
use crate::eliminate_placeholders::rewrite_higher_kinded_outlives_as_constraints;
25+
use crate::eliminate_placeholders::compute_sccs_applying_placeholder_outlives_constraints;
2626
use crate::polonius::PoloniusDiagnosticsContext;
2727
use crate::polonius::legacy::{
2828
PoloniusFacts, PoloniusFactsExt, PoloniusLocationTable, PoloniusOutput,
@@ -118,7 +118,7 @@ pub(crate) fn compute_regions<'a, 'tcx>(
118118
Rc::clone(&location_map),
119119
);
120120

121-
let lowered_constraints = rewrite_higher_kinded_outlives_as_constraints(
121+
let lowered_constraints = compute_sccs_applying_placeholder_outlives_constraints(
122122
constraints,
123123
&universal_region_relations,
124124
infcx,

0 commit comments

Comments
 (0)