@@ -34,7 +34,7 @@ use ty::{self, Ty, TyCtxt};
3434use ty:: error:: { ExpectedFound , TypeError , UnconstrainedNumeric } ;
3535use ty:: fold:: { TypeFoldable , TypeFolder , TypeVisitor } ;
3636use ty:: relate:: { Relate , RelateResult , TypeRelation } ;
37- use traits:: { self , PredicateObligations , ProjectionMode } ;
37+ use traits:: { self , PredicateObligations , Reveal } ;
3838use rustc_data_structures:: unify:: { self , UnificationTable } ;
3939use std:: cell:: { Cell , RefCell , Ref , RefMut } ;
4040use std:: fmt;
@@ -147,8 +147,8 @@ pub struct InferCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
147147
148148 // Sadly, the behavior of projection varies a bit depending on the
149149 // stage of compilation. The specifics are given in the
150- // documentation for `ProjectionMode `.
151- projection_mode : ProjectionMode ,
150+ // documentation for `Reveal `.
151+ projection_mode : Reveal ,
152152
153153 // When an error occurs, we want to avoid reporting "derived"
154154 // errors that are due to this original failure. Normally, we
@@ -459,15 +459,15 @@ pub struct InferCtxtBuilder<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
459459 arenas : ty:: CtxtArenas < ' tcx > ,
460460 tables : Option < RefCell < ty:: Tables < ' tcx > > > ,
461461 param_env : Option < ty:: ParameterEnvironment < ' gcx > > ,
462- projection_mode : ProjectionMode ,
462+ projection_mode : Reveal ,
463463 normalize : bool
464464}
465465
466466impl < ' a , ' gcx , ' tcx > TyCtxt < ' a , ' gcx , ' gcx > {
467467 pub fn infer_ctxt ( self ,
468468 tables : Option < ty:: Tables < ' tcx > > ,
469469 param_env : Option < ty:: ParameterEnvironment < ' gcx > > ,
470- projection_mode : ProjectionMode )
470+ projection_mode : Reveal )
471471 -> InferCtxtBuilder < ' a , ' gcx , ' tcx > {
472472 InferCtxtBuilder {
473473 global_tcx : self ,
@@ -479,7 +479,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'gcx> {
479479 }
480480 }
481481
482- pub fn normalizing_infer_ctxt ( self , projection_mode : ProjectionMode )
482+ pub fn normalizing_infer_ctxt ( self , projection_mode : Reveal )
483483 -> InferCtxtBuilder < ' a , ' gcx , ' tcx > {
484484 InferCtxtBuilder {
485485 global_tcx : self ,
@@ -509,7 +509,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'gcx> {
509509 projection_cache : RefCell :: new ( traits:: ProjectionCache :: new ( ) ) ,
510510 reported_trait_errors : RefCell :: new ( FnvHashSet ( ) ) ,
511511 normalize : false ,
512- projection_mode : ProjectionMode :: AnyFinal ,
512+ projection_mode : Reveal :: NotSpecializable ,
513513 tainted_by_errors_flag : Cell :: new ( false ) ,
514514 err_count_on_creation : self . sess . err_count ( ) ,
515515 obligations_in_snapshot : Cell :: new ( false ) ,
@@ -641,7 +641,7 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
641641 return value;
642642 }
643643
644- self . infer_ctxt ( None , None , ProjectionMode :: Any ) . enter ( |infcx| {
644+ self . infer_ctxt ( None , None , Reveal :: All ) . enter ( |infcx| {
645645 value. trans_normalize ( & infcx)
646646 } )
647647 }
@@ -659,7 +659,7 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
659659 return value;
660660 }
661661
662- self . infer_ctxt ( None , Some ( env. clone ( ) ) , ProjectionMode :: Any ) . enter ( |infcx| {
662+ self . infer_ctxt ( None , Some ( env. clone ( ) ) , Reveal :: All ) . enter ( |infcx| {
663663 value. trans_normalize ( & infcx)
664664 } )
665665 }
@@ -736,7 +736,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
736736 Ok ( self . tcx . erase_regions ( & result) )
737737 }
738738
739- pub fn projection_mode ( & self ) -> ProjectionMode {
739+ pub fn projection_mode ( & self ) -> Reveal {
740740 self . projection_mode
741741 }
742742
0 commit comments