@@ -28,7 +28,7 @@ use middle::lang_items;
2828use mir:: tcx:: LvalueTy ;
2929use ty:: subst:: { Kind , Subst , Substs } ;
3030use ty:: { TyVid , IntVid , FloatVid } ;
31- use ty:: { self , ParameterEnvironment , Ty , TyCtxt } ;
31+ use ty:: { self , ParamEnv , Ty , TyCtxt } ;
3232use ty:: error:: { ExpectedFound , TypeError , UnconstrainedNumeric } ;
3333use ty:: fold:: { TypeFoldable , TypeFolder , TypeVisitor } ;
3434use ty:: relate:: { Relate , RelateResult , TypeRelation } ;
@@ -161,7 +161,7 @@ pub struct InferCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
161161 // For region variables.
162162 region_vars : RegionVarBindings < ' a , ' gcx , ' tcx > ,
163163
164- pub parameter_environment : ty:: ParameterEnvironment < ' gcx > ,
164+ pub parameter_environment : ty:: ParamEnv < ' gcx > ,
165165
166166 /// Caches the results of trait selection. This cache is used
167167 /// for things that have to do with the parameters in scope.
@@ -406,41 +406,41 @@ pub trait InferEnv<'a, 'tcx> {
406406 fn to_parts ( self , tcx : TyCtxt < ' a , ' tcx , ' tcx > )
407407 -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
408408 Option < ty:: TypeckTables < ' tcx > > ,
409- Option < ty:: ParameterEnvironment < ' tcx > > ) ;
409+ Option < ty:: ParamEnv < ' tcx > > ) ;
410410}
411411
412412impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( ) {
413413 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
414414 -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
415415 Option < ty:: TypeckTables < ' tcx > > ,
416- Option < ty:: ParameterEnvironment < ' tcx > > ) {
416+ Option < ty:: ParamEnv < ' tcx > > ) {
417417 ( None , None , None )
418418 }
419419}
420420
421- impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ty:: ParameterEnvironment < ' tcx > {
421+ impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ty:: ParamEnv < ' tcx > {
422422 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
423423 -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
424424 Option < ty:: TypeckTables < ' tcx > > ,
425- Option < ty:: ParameterEnvironment < ' tcx > > ) {
425+ Option < ty:: ParamEnv < ' tcx > > ) {
426426 ( None , None , Some ( self ) )
427427 }
428428}
429429
430- impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( & ' a ty:: TypeckTables < ' tcx > , ty:: ParameterEnvironment < ' tcx > ) {
430+ impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( & ' a ty:: TypeckTables < ' tcx > , ty:: ParamEnv < ' tcx > ) {
431431 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
432432 -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
433433 Option < ty:: TypeckTables < ' tcx > > ,
434- Option < ty:: ParameterEnvironment < ' tcx > > ) {
434+ Option < ty:: ParamEnv < ' tcx > > ) {
435435 ( Some ( self . 0 ) , None , Some ( self . 1 ) )
436436 }
437437}
438438
439- impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( ty:: TypeckTables < ' tcx > , ty:: ParameterEnvironment < ' tcx > ) {
439+ impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( ty:: TypeckTables < ' tcx > , ty:: ParamEnv < ' tcx > ) {
440440 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
441441 -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
442442 Option < ty:: TypeckTables < ' tcx > > ,
443- Option < ty:: ParameterEnvironment < ' tcx > > ) {
443+ Option < ty:: ParamEnv < ' tcx > > ) {
444444 ( None , Some ( self . 0 ) , Some ( self . 1 ) )
445445 }
446446}
@@ -449,7 +449,7 @@ impl<'a, 'tcx> InferEnv<'a, 'tcx> for hir::BodyId {
449449 fn to_parts ( self , tcx : TyCtxt < ' a , ' tcx , ' tcx > )
450450 -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
451451 Option < ty:: TypeckTables < ' tcx > > ,
452- Option < ty:: ParameterEnvironment < ' tcx > > ) {
452+ Option < ty:: ParamEnv < ' tcx > > ) {
453453 let def_id = tcx. hir . body_owner_def_id ( self ) ;
454454 ( Some ( tcx. typeck_tables_of ( def_id) ) ,
455455 None ,
@@ -465,7 +465,7 @@ pub struct InferCtxtBuilder<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
465465 arena : DroplessArena ,
466466 fresh_tables : Option < RefCell < ty:: TypeckTables < ' tcx > > > ,
467467 tables : Option < & ' a ty:: TypeckTables < ' gcx > > ,
468- param_env : Option < ty:: ParameterEnvironment < ' gcx > > ,
468+ param_env : Option < ty:: ParamEnv < ' gcx > > ,
469469 projection_mode : Reveal ,
470470}
471471
@@ -526,7 +526,7 @@ impl<'a, 'gcx, 'tcx> InferCtxtBuilder<'a, 'gcx, 'tcx> {
526526 let tables = tables. map ( InferTables :: Interned ) . unwrap_or_else ( || {
527527 fresh_tables. as_ref ( ) . map_or ( InferTables :: Missing , InferTables :: InProgress )
528528 } ) ;
529- let param_env = param_env. take ( ) . unwrap_or_else ( || ParameterEnvironment :: empty ( ) ) ;
529+ let param_env = param_env. take ( ) . unwrap_or_else ( || ParamEnv :: empty ( ) ) ;
530530 global_tcx. enter_local ( arena, |tcx| f ( InferCtxt {
531531 tcx : tcx,
532532 tables : tables,
@@ -648,7 +648,7 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
648648 }
649649
650650 pub fn normalize_associated_type_in_env < T > (
651- self , value : & T , env : ty:: ParameterEnvironment < ' tcx >
651+ self , value : & T , env : ty:: ParamEnv < ' tcx >
652652 ) -> T
653653 where T : TransNormalize < ' tcx >
654654 {
@@ -1672,7 +1672,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
16721672 self . tables . borrow ( ) . upvar_capture_map . get ( & upvar_id) . cloned ( )
16731673 }
16741674
1675- pub fn param_env ( & self ) -> ty:: ParameterEnvironment < ' gcx > {
1675+ pub fn param_env ( & self ) -> ty:: ParamEnv < ' gcx > {
16761676 self . parameter_environment
16771677 }
16781678
0 commit comments