@@ -136,7 +136,8 @@ mod autoderef;
136
136
pub mod dropck;
137
137
pub mod _match;
138
138
pub mod writeback;
139
- pub mod regionck;
139
+ mod regionck;
140
+ mod regionck_outlives;
140
141
pub mod coercion;
141
142
pub mod demand;
142
143
pub mod method;
@@ -657,29 +658,10 @@ impl<'a, 'gcx, 'tcx> Inherited<'a, 'gcx, 'tcx> {
657
658
value : & T ) -> T
658
659
where T : TypeFoldable < ' tcx >
659
660
{
660
- let ok = self . normalize_associated_types_in_as_infer_ok ( span, body_id, param_env, value) ;
661
+ let ok = self . partially_normalize_associated_types_in ( span, body_id, param_env, value) ;
661
662
self . register_infer_ok_obligations ( ok)
662
663
}
663
664
664
- fn normalize_associated_types_in_as_infer_ok < T > ( & self ,
665
- span : Span ,
666
- body_id : ast:: NodeId ,
667
- param_env : ty:: ParamEnv < ' tcx > ,
668
- value : & T )
669
- -> InferOk < ' tcx , T >
670
- where T : TypeFoldable < ' tcx >
671
- {
672
- debug ! ( "normalize_associated_types_in(value={:?})" , value) ;
673
- let mut selcx = traits:: SelectionContext :: new ( self ) ;
674
- let cause = ObligationCause :: misc ( span, body_id) ;
675
- let traits:: Normalized { value, obligations } =
676
- traits:: normalize ( & mut selcx, param_env, cause, value) ;
677
- debug ! ( "normalize_associated_types_in: result={:?} predicates={:?}" ,
678
- value,
679
- obligations) ;
680
- InferOk { value, obligations }
681
- }
682
-
683
665
/// Replace any late-bound regions bound in `value` with
684
666
/// free variants attached to `all_outlive_scope`.
685
667
fn liberate_late_bound_regions < T > ( & self ,
@@ -1970,10 +1952,10 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
1970
1952
-> InferOk < ' tcx , T >
1971
1953
where T : TypeFoldable < ' tcx >
1972
1954
{
1973
- self . inh . normalize_associated_types_in_as_infer_ok ( span,
1974
- self . body_id ,
1975
- self . param_env ,
1976
- value)
1955
+ self . inh . partially_normalize_associated_types_in ( span,
1956
+ self . body_id ,
1957
+ self . param_env ,
1958
+ value)
1977
1959
}
1978
1960
1979
1961
pub fn require_type_meets ( & self ,
0 commit comments