@@ -116,7 +116,9 @@ impl RegionTracker {
116
116
representative_is_existential,
117
117
}
118
118
}
119
- fn universe ( self ) -> UniverseIndex {
119
+
120
+ /// The smallest-indexed universe reachable from and/or in this SCC.
121
+ fn min_universe ( self ) -> UniverseIndex {
120
122
self . min_reachable_universe
121
123
}
122
124
@@ -133,7 +135,7 @@ impl RegionTracker {
133
135
/// Returns `true` if during the annotated SCC reaches a placeholder
134
136
/// with a universe larger than the smallest reachable one, `false` otherwise.
135
137
pub ( crate ) fn has_incompatible_universes ( & self ) -> bool {
136
- self . universe ( ) . cannot_name ( self . max_placeholder_universe_reached )
138
+ self . min_universe ( ) . cannot_name ( self . max_placeholder_universe_reached )
137
139
}
138
140
}
139
141
@@ -780,7 +782,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
780
782
// If the member region lives in a higher universe, we currently choose
781
783
// the most conservative option by leaving it unchanged.
782
784
783
- if !self . constraint_sccs ( ) . annotation ( scc) . universe ( ) . is_root ( ) {
785
+ if !self . constraint_sccs ( ) . annotation ( scc) . min_universe ( ) . is_root ( ) {
784
786
return ;
785
787
}
786
788
@@ -854,12 +856,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
854
856
fn universe_compatible ( & self , scc_b : ConstraintSccIndex , scc_a : ConstraintSccIndex ) -> bool {
855
857
let a_annotation = self . constraint_sccs ( ) . annotation ( scc_a) ;
856
858
let b_annotation = self . constraint_sccs ( ) . annotation ( scc_b) ;
857
- let a_universe = a_annotation. universe ( ) ;
859
+ let a_universe = a_annotation. min_universe ( ) ;
858
860
859
861
// If scc_b's declared universe is a subset of
860
862
// scc_a's declared universe (typically, both are ROOT), then
861
863
// it cannot contain any problematic universe elements.
862
- if a_universe. can_name ( b_annotation. universe ( ) ) {
864
+ if a_universe. can_name ( b_annotation. min_universe ( ) ) {
863
865
return true ;
864
866
}
865
867
@@ -973,7 +975,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
973
975
"lower_bound = {:?} r_scc={:?} universe={:?}" ,
974
976
lower_bound,
975
977
r_scc,
976
- self . constraint_sccs. annotation( r_scc) . universe ( )
978
+ self . constraint_sccs. annotation( r_scc) . min_universe ( )
977
979
) ;
978
980
979
981
// If the type test requires that `T: 'a` where `'a` is a
@@ -1490,7 +1492,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1490
1492
/// The minimum universe of any variable reachable from this
1491
1493
/// SCC, inside or outside of it.
1492
1494
fn scc_universe ( & self , scc : ConstraintSccIndex ) -> UniverseIndex {
1493
- self . constraint_sccs ( ) . annotation ( scc) . universe ( )
1495
+ self . constraint_sccs ( ) . annotation ( scc) . min_universe ( )
1494
1496
}
1495
1497
/// Checks the final value for the free region `fr` to see if it
1496
1498
/// grew too large. In particular, examine what `end(X)` points
0 commit comments