@@ -35,7 +35,7 @@ use traits::{FulfillmentContext, TraitEngine};
3535use traits:: { Obligation , ObligationCause , PredicateObligation } ;
3636use ty:: fold:: TypeFoldable ;
3737use ty:: subst:: { Kind , UnpackedKind } ;
38- use ty:: { self , BoundTyIndex , Lift , Ty , TyCtxt } ;
38+ use ty:: { self , BoundVar , Lift , Ty , TyCtxt } ;
3939
4040impl < ' cx , ' gcx , ' tcx > InferCtxtBuilder < ' cx , ' gcx , ' tcx > {
4141 /// The "main method" for a canonicalized trait query. Given the
@@ -273,7 +273,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
273273 for ( index, original_value) in original_values. var_values . iter ( ) . enumerate ( ) {
274274 // ...with the value `v_r` of that variable from the query.
275275 let result_value = query_response. substitute_projected ( self . tcx , & result_subst, |v| {
276- & v. var_values [ BoundTyIndex :: new ( index) ]
276+ & v. var_values [ BoundVar :: new ( index) ]
277277 } ) ;
278278 match ( original_value. unpack ( ) , result_value. unpack ( ) ) {
279279 ( UnpackedKind :: Lifetime ( ty:: ReErased ) , UnpackedKind :: Lifetime ( ty:: ReErased ) ) => {
@@ -423,7 +423,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
423423 // is directly equal to one of the canonical variables in the
424424 // result, then we can type the corresponding value from the
425425 // input. See the example above.
426- let mut opt_values: IndexVec < BoundTyIndex , Option < Kind < ' tcx > > > =
426+ let mut opt_values: IndexVec < BoundVar , Option < Kind < ' tcx > > > =
427427 IndexVec :: from_elem_n ( None , query_response. variables . len ( ) ) ;
428428
429429 // In terms of our example above, we are iterating over pairs like:
@@ -457,7 +457,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
457457 . enumerate ( )
458458 . map ( |( index, info) | {
459459 if info. is_existential ( ) {
460- match opt_values[ BoundTyIndex :: new ( index) ] {
460+ match opt_values[ BoundVar :: new ( index) ] {
461461 Some ( k) => k,
462462 None => self . instantiate_canonical_var ( cause. span , * info, |u| {
463463 universe_map[ u. as_usize ( ) ]
@@ -496,7 +496,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
496496 // canonical variable; this is taken from
497497 // `query_response.var_values` after applying the substitution
498498 // `result_subst`.
499- let substituted_query_response = |index : BoundTyIndex | -> Kind < ' tcx > {
499+ let substituted_query_response = |index : BoundVar | -> Kind < ' tcx > {
500500 query_response. substitute_projected ( self . tcx , & result_subst, |v| & v. var_values [ index] )
501501 } ;
502502
@@ -552,12 +552,12 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
552552 cause : & ObligationCause < ' tcx > ,
553553 param_env : ty:: ParamEnv < ' tcx > ,
554554 variables1 : & OriginalQueryValues < ' tcx > ,
555- variables2 : impl Fn ( BoundTyIndex ) -> Kind < ' tcx > ,
555+ variables2 : impl Fn ( BoundVar ) -> Kind < ' tcx > ,
556556 ) -> InferResult < ' tcx , ( ) > {
557557 self . commit_if_ok ( |_| {
558558 let mut obligations = vec ! [ ] ;
559559 for ( index, value1) in variables1. var_values . iter ( ) . enumerate ( ) {
560- let value2 = variables2 ( BoundTyIndex :: new ( index) ) ;
560+ let value2 = variables2 ( BoundVar :: new ( index) ) ;
561561
562562 match ( value1. unpack ( ) , value2. unpack ( ) ) {
563563 ( UnpackedKind :: Type ( v1) , UnpackedKind :: Type ( v2) ) => {
0 commit comments