@@ -34,7 +34,7 @@ use ty::{self, Ty, TyCtxt};
34
34
use ty:: error:: { ExpectedFound , TypeError , UnconstrainedNumeric } ;
35
35
use ty:: fold:: { TypeFoldable , TypeFolder , TypeVisitor } ;
36
36
use ty:: relate:: { Relate , RelateResult , TypeRelation } ;
37
- use traits:: { self , PredicateObligations , ProjectionMode } ;
37
+ use traits:: { self , PredicateObligations , Reveal } ;
38
38
use rustc_data_structures:: unify:: { self , UnificationTable } ;
39
39
use std:: cell:: { Cell , RefCell , Ref , RefMut } ;
40
40
use std:: fmt;
@@ -147,8 +147,8 @@ pub struct InferCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
147
147
148
148
// Sadly, the behavior of projection varies a bit depending on the
149
149
// 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 ,
152
152
153
153
// When an error occurs, we want to avoid reporting "derived"
154
154
// errors that are due to this original failure. Normally, we
@@ -459,15 +459,15 @@ pub struct InferCtxtBuilder<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
459
459
arenas : ty:: CtxtArenas < ' tcx > ,
460
460
tables : Option < RefCell < ty:: Tables < ' tcx > > > ,
461
461
param_env : Option < ty:: ParameterEnvironment < ' gcx > > ,
462
- projection_mode : ProjectionMode ,
462
+ projection_mode : Reveal ,
463
463
normalize : bool
464
464
}
465
465
466
466
impl < ' a , ' gcx , ' tcx > TyCtxt < ' a , ' gcx , ' gcx > {
467
467
pub fn infer_ctxt ( self ,
468
468
tables : Option < ty:: Tables < ' tcx > > ,
469
469
param_env : Option < ty:: ParameterEnvironment < ' gcx > > ,
470
- projection_mode : ProjectionMode )
470
+ projection_mode : Reveal )
471
471
-> InferCtxtBuilder < ' a , ' gcx , ' tcx > {
472
472
InferCtxtBuilder {
473
473
global_tcx : self ,
@@ -479,7 +479,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'gcx> {
479
479
}
480
480
}
481
481
482
- pub fn normalizing_infer_ctxt ( self , projection_mode : ProjectionMode )
482
+ pub fn normalizing_infer_ctxt ( self , projection_mode : Reveal )
483
483
-> InferCtxtBuilder < ' a , ' gcx , ' tcx > {
484
484
InferCtxtBuilder {
485
485
global_tcx : self ,
@@ -509,7 +509,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'gcx> {
509
509
projection_cache : RefCell :: new ( traits:: ProjectionCache :: new ( ) ) ,
510
510
reported_trait_errors : RefCell :: new ( FnvHashSet ( ) ) ,
511
511
normalize : false ,
512
- projection_mode : ProjectionMode :: AnyFinal ,
512
+ projection_mode : Reveal :: NotSpecializable ,
513
513
tainted_by_errors_flag : Cell :: new ( false ) ,
514
514
err_count_on_creation : self . sess . err_count ( ) ,
515
515
obligations_in_snapshot : Cell :: new ( false ) ,
@@ -641,7 +641,7 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
641
641
return value;
642
642
}
643
643
644
- self . infer_ctxt ( None , None , ProjectionMode :: Any ) . enter ( |infcx| {
644
+ self . infer_ctxt ( None , None , Reveal :: All ) . enter ( |infcx| {
645
645
value. trans_normalize ( & infcx)
646
646
} )
647
647
}
@@ -659,7 +659,7 @@ impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx> {
659
659
return value;
660
660
}
661
661
662
- self . infer_ctxt ( None , Some ( env. clone ( ) ) , ProjectionMode :: Any ) . enter ( |infcx| {
662
+ self . infer_ctxt ( None , Some ( env. clone ( ) ) , Reveal :: All ) . enter ( |infcx| {
663
663
value. trans_normalize ( & infcx)
664
664
} )
665
665
}
@@ -736,7 +736,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
736
736
Ok ( self . tcx . erase_regions ( & result) )
737
737
}
738
738
739
- pub fn projection_mode ( & self ) -> ProjectionMode {
739
+ pub fn projection_mode ( & self ) -> Reveal {
740
740
self . projection_mode
741
741
}
742
742
0 commit comments