@@ -9,7 +9,7 @@ use rustc_hir::def_id::DefId;
99use rustc_index:: vec:: IndexVec ;
1010use rustc_infer:: infer:: canonical:: QueryOutlivesConstraint ;
1111use rustc_infer:: infer:: region_constraints:: { GenericKind , VarInfos , VerifyBound } ;
12- use rustc_infer:: infer:: { InferCtxt , NLLRegionVariableOrigin , RegionVariableOrigin } ;
12+ use rustc_infer:: infer:: { InferCtxt , NllRegionVariableOrigin , RegionVariableOrigin } ;
1313use rustc_middle:: mir:: {
1414 Body , ClosureOutlivesRequirement , ClosureOutlivesSubject , ClosureRegionRequirements ,
1515 ConstraintCategory , Local , Location , ReturnConstraint ,
@@ -143,9 +143,9 @@ pub(crate) struct AppliedMemberConstraint {
143143
144144pub ( crate ) struct RegionDefinition < ' tcx > {
145145 /// What kind of variable is this -- a free region? existential
146- /// variable? etc. (See the `NLLRegionVariableOrigin ` for more
146+ /// variable? etc. (See the `NllRegionVariableOrigin ` for more
147147 /// info.)
148- pub ( in crate :: borrow_check) origin : NLLRegionVariableOrigin ,
148+ pub ( in crate :: borrow_check) origin : NllRegionVariableOrigin ,
149149
150150 /// Which universe is this region variable defined in? This is
151151 /// most often `ty::UniverseIndex::ROOT`, but when we encounter
@@ -451,7 +451,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
451451 let scc = self . constraint_sccs . scc ( variable) ;
452452
453453 match self . definitions [ variable] . origin {
454- NLLRegionVariableOrigin :: FreeRegion => {
454+ NllRegionVariableOrigin :: FreeRegion => {
455455 // For each free, universally quantified region X:
456456
457457 // Add all nodes in the CFG to liveness constraints
@@ -462,7 +462,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
462462 self . scc_values . add_element ( scc, variable) ;
463463 }
464464
465- NLLRegionVariableOrigin :: Placeholder ( placeholder) => {
465+ NllRegionVariableOrigin :: Placeholder ( placeholder) => {
466466 // Each placeholder region is only visible from
467467 // its universe `ui` and its extensions. So we
468468 // can't just add it into `scc` unless the
@@ -480,8 +480,8 @@ impl<'tcx> RegionInferenceContext<'tcx> {
480480 }
481481 }
482482
483- NLLRegionVariableOrigin :: RootEmptyRegion
484- | NLLRegionVariableOrigin :: Existential { .. } => {
483+ NllRegionVariableOrigin :: RootEmptyRegion
484+ | NllRegionVariableOrigin :: Existential { .. } => {
485485 // For existential, regions, nothing to do.
486486 }
487487 }
@@ -1348,7 +1348,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
13481348 ) {
13491349 for ( fr, fr_definition) in self . definitions . iter_enumerated ( ) {
13501350 match fr_definition. origin {
1351- NLLRegionVariableOrigin :: FreeRegion => {
1351+ NllRegionVariableOrigin :: FreeRegion => {
13521352 // Go through each of the universal regions `fr` and check that
13531353 // they did not grow too large, accumulating any requirements
13541354 // for our caller into the `outlives_requirements` vector.
@@ -1360,12 +1360,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
13601360 ) ;
13611361 }
13621362
1363- NLLRegionVariableOrigin :: Placeholder ( placeholder) => {
1363+ NllRegionVariableOrigin :: Placeholder ( placeholder) => {
13641364 self . check_bound_universal_region ( fr, placeholder, errors_buffer) ;
13651365 }
13661366
1367- NLLRegionVariableOrigin :: RootEmptyRegion
1368- | NLLRegionVariableOrigin :: Existential { .. } => {
1367+ NllRegionVariableOrigin :: RootEmptyRegion
1368+ | NllRegionVariableOrigin :: Existential { .. } => {
13691369 // nothing to check here
13701370 }
13711371 }
@@ -1449,7 +1449,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
14491449 errors_buffer. push ( RegionErrorKind :: RegionError {
14501450 longer_fr : * longer_fr,
14511451 shorter_fr : * shorter_fr,
1452- fr_origin : NLLRegionVariableOrigin :: FreeRegion ,
1452+ fr_origin : NllRegionVariableOrigin :: FreeRegion ,
14531453 is_reported : true ,
14541454 } ) ;
14551455 }
@@ -1459,16 +1459,16 @@ impl<'tcx> RegionInferenceContext<'tcx> {
14591459 // a more complete picture on how to separate this responsibility.
14601460 for ( fr, fr_definition) in self . definitions . iter_enumerated ( ) {
14611461 match fr_definition. origin {
1462- NLLRegionVariableOrigin :: FreeRegion => {
1462+ NllRegionVariableOrigin :: FreeRegion => {
14631463 // handled by polonius above
14641464 }
14651465
1466- NLLRegionVariableOrigin :: Placeholder ( placeholder) => {
1466+ NllRegionVariableOrigin :: Placeholder ( placeholder) => {
14671467 self . check_bound_universal_region ( fr, placeholder, errors_buffer) ;
14681468 }
14691469
1470- NLLRegionVariableOrigin :: RootEmptyRegion
1471- | NLLRegionVariableOrigin :: Existential { .. } => {
1470+ NllRegionVariableOrigin :: RootEmptyRegion
1471+ | NllRegionVariableOrigin :: Existential { .. } => {
14721472 // nothing to check here
14731473 }
14741474 }
@@ -1516,7 +1516,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
15161516 errors_buffer. push ( RegionErrorKind :: RegionError {
15171517 longer_fr,
15181518 shorter_fr : representative,
1519- fr_origin : NLLRegionVariableOrigin :: FreeRegion ,
1519+ fr_origin : NllRegionVariableOrigin :: FreeRegion ,
15201520 is_reported : true ,
15211521 } ) ;
15221522 }
@@ -1539,7 +1539,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
15391539 errors_buffer. push ( RegionErrorKind :: RegionError {
15401540 longer_fr,
15411541 shorter_fr,
1542- fr_origin : NLLRegionVariableOrigin :: FreeRegion ,
1542+ fr_origin : NllRegionVariableOrigin :: FreeRegion ,
15431543 is_reported : !error_reported,
15441544 } ) ;
15451545
@@ -1597,7 +1597,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
15971597 let blame_span_category = self . find_outlives_blame_span (
15981598 body,
15991599 longer_fr,
1600- NLLRegionVariableOrigin :: FreeRegion ,
1600+ NllRegionVariableOrigin :: FreeRegion ,
16011601 shorter_fr,
16021602 ) ;
16031603
@@ -1656,7 +1656,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
16561656 errors_buffer. push ( RegionErrorKind :: BoundUniversalRegionError {
16571657 longer_fr,
16581658 error_element,
1659- fr_origin : NLLRegionVariableOrigin :: Placeholder ( placeholder) ,
1659+ fr_origin : NllRegionVariableOrigin :: Placeholder ( placeholder) ,
16601660 } ) ;
16611661 }
16621662
@@ -1732,7 +1732,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
17321732 debug ! ( "cannot_name_value_of(r1={:?}, r2={:?})" , r1, r2) ;
17331733
17341734 match self . definitions [ r2] . origin {
1735- NLLRegionVariableOrigin :: Placeholder ( placeholder) => {
1735+ NllRegionVariableOrigin :: Placeholder ( placeholder) => {
17361736 let universe1 = self . definitions [ r1] . universe ;
17371737 debug ! (
17381738 "cannot_name_value_of: universe1={:?} placeholder={:?}" ,
@@ -1741,9 +1741,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
17411741 universe1. cannot_name ( placeholder. universe )
17421742 }
17431743
1744- NLLRegionVariableOrigin :: RootEmptyRegion
1745- | NLLRegionVariableOrigin :: FreeRegion
1746- | NLLRegionVariableOrigin :: Existential { .. } => false ,
1744+ NllRegionVariableOrigin :: RootEmptyRegion
1745+ | NllRegionVariableOrigin :: FreeRegion
1746+ | NllRegionVariableOrigin :: Existential { .. } => false ,
17471747 }
17481748 }
17491749
@@ -1771,7 +1771,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
17711771 & self ,
17721772 body : & Body < ' tcx > ,
17731773 fr1 : RegionVid ,
1774- fr1_origin : NLLRegionVariableOrigin ,
1774+ fr1_origin : NllRegionVariableOrigin ,
17751775 fr2 : RegionVid ,
17761776 ) -> ( ConstraintCategory , Span ) {
17771777 let ( category, _, span) = self . best_blame_constraint ( body, fr1, fr1_origin, |r| {
@@ -1933,7 +1933,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
19331933 . definitions
19341934 . iter_enumerated ( )
19351935 . find_map ( |( r, definition) | match definition. origin {
1936- NLLRegionVariableOrigin :: Placeholder ( p) if p == error_placeholder => Some ( r) ,
1936+ NllRegionVariableOrigin :: Placeholder ( p) if p == error_placeholder => Some ( r) ,
19371937 _ => None ,
19381938 } )
19391939 . unwrap ( ) ,
@@ -1965,7 +1965,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
19651965 & self ,
19661966 body : & Body < ' tcx > ,
19671967 from_region : RegionVid ,
1968- from_region_origin : NLLRegionVariableOrigin ,
1968+ from_region_origin : NllRegionVariableOrigin ,
19691969 target_test : impl Fn ( RegionVid ) -> bool ,
19701970 ) -> ( ConstraintCategory , bool , Span ) {
19711971 debug ! (
@@ -2059,11 +2059,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
20592059 //
20602060 // and here we prefer to blame the source (the y = x statement).
20612061 let blame_source = match from_region_origin {
2062- NLLRegionVariableOrigin :: FreeRegion
2063- | NLLRegionVariableOrigin :: Existential { from_forall : false } => true ,
2064- NLLRegionVariableOrigin :: RootEmptyRegion
2065- | NLLRegionVariableOrigin :: Placeholder ( _)
2066- | NLLRegionVariableOrigin :: Existential { from_forall : true } => false ,
2062+ NllRegionVariableOrigin :: FreeRegion
2063+ | NllRegionVariableOrigin :: Existential { from_forall : false } => true ,
2064+ NllRegionVariableOrigin :: RootEmptyRegion
2065+ | NllRegionVariableOrigin :: Placeholder ( _)
2066+ | NllRegionVariableOrigin :: Existential { from_forall : true } => false ,
20672067 } ;
20682068
20692069 let find_region = |i : & usize | {
@@ -2144,8 +2144,8 @@ impl<'tcx> RegionDefinition<'tcx> {
21442144 // `init_universal_regions`.
21452145
21462146 let origin = match rv_origin {
2147- RegionVariableOrigin :: NLL ( origin) => origin,
2148- _ => NLLRegionVariableOrigin :: Existential { from_forall : false } ,
2147+ RegionVariableOrigin :: Nll ( origin) => origin,
2148+ _ => NllRegionVariableOrigin :: Existential { from_forall : false } ,
21492149 } ;
21502150
21512151 Self { origin, universe, external_name : None }
0 commit comments