@@ -35,18 +35,18 @@ pub(crate) struct LoweredConstraints<'tcx> {
3535 pub ( crate ) placeholder_indices : PlaceholderIndices < ' tcx > ,
3636}
3737
38- impl < ' d , ' tcx , A : scc:: Annotation > SccAnnotations < ' d , ' tcx , A > {
39- pub ( crate ) fn init ( definitions : & ' d IndexVec < RegionVid , RegionDefinition < ' tcx > > ) -> Self {
40- Self { scc_to_annotation : IndexVec :: new ( ) , definitions }
41- }
42- }
43-
4438/// A Visitor for SCC annotation construction.
4539pub ( crate ) struct SccAnnotations < ' d , ' tcx , A : scc:: Annotation > {
4640 pub ( crate ) scc_to_annotation : IndexVec < ConstraintSccIndex , A > ,
4741 definitions : & ' d IndexVec < RegionVid , RegionDefinition < ' tcx > > ,
4842}
4943
44+ impl < ' d , ' tcx , A : scc:: Annotation > SccAnnotations < ' d , ' tcx , A > {
45+ pub ( crate ) fn init ( definitions : & ' d IndexVec < RegionVid , RegionDefinition < ' tcx > > ) -> Self {
46+ Self { scc_to_annotation : IndexVec :: new ( ) , definitions }
47+ }
48+ }
49+
5050impl scc:: Annotations < RegionVid > for SccAnnotations < ' _ , ' _ , RegionTracker > {
5151 fn new ( & self , element : RegionVid ) -> RegionTracker {
5252 RegionTracker :: new ( element, & self . definitions [ element] )
@@ -118,7 +118,7 @@ impl RegionTracker {
118118 }
119119
120120 /// The largest universe this SCC can name. It's the smallest
121- /// largest nameable universe of any reachable region, or
121+ /// max- nameable- universe of any reachable region, or
122122 /// `max_nameable(r) = min (max_nameable(r') for r' reachable from r)`
123123 pub ( crate ) fn max_nameable_universe ( self ) -> UniverseIndex {
124124 self . max_nameable_universe . 0
@@ -208,7 +208,7 @@ pub(super) fn region_definitions<'tcx>(
208208/// graph such that there is a series of constraints
209209/// A: B: C: ... : X where
210210/// A contains a placeholder whose universe cannot be named by X,
211- /// add a constraint that A : 'static. This is a safe upper bound
211+ /// add a constraint that X : 'static. This is a safe upper bound
212212/// in the face of borrow checker/trait solver limitations that will
213213/// eventually go away.
214214///
@@ -327,8 +327,6 @@ pub(crate) fn rewrite_placeholder_outlives<'tcx>(
327327
328328 for scc in sccs. all_sccs ( ) {
329329 // No point in adding 'static: 'static!
330- // This micro-optimisation makes somewhat sense
331- // because static outlives *everything*.
332330 if scc == sccs. scc ( fr_static) {
333331 continue ;
334332 }
0 commit comments