@@ -35,7 +35,7 @@ use traits::{FulfillmentContext, TraitEngine};
35
35
use traits:: { Obligation , ObligationCause , PredicateObligation } ;
36
36
use ty:: fold:: TypeFoldable ;
37
37
use ty:: subst:: { Kind , UnpackedKind } ;
38
- use ty:: { self , BoundTyIndex , Lift , Ty , TyCtxt } ;
38
+ use ty:: { self , BoundVar , Lift , Ty , TyCtxt } ;
39
39
40
40
impl < ' cx , ' gcx , ' tcx > InferCtxtBuilder < ' cx , ' gcx , ' tcx > {
41
41
/// The "main method" for a canonicalized trait query. Given the
@@ -273,7 +273,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
273
273
for ( index, original_value) in original_values. var_values . iter ( ) . enumerate ( ) {
274
274
// ...with the value `v_r` of that variable from the query.
275
275
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) ]
277
277
} ) ;
278
278
match ( original_value. unpack ( ) , result_value. unpack ( ) ) {
279
279
( UnpackedKind :: Lifetime ( ty:: ReErased ) , UnpackedKind :: Lifetime ( ty:: ReErased ) ) => {
@@ -423,7 +423,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
423
423
// is directly equal to one of the canonical variables in the
424
424
// result, then we can type the corresponding value from the
425
425
// 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 > > > =
427
427
IndexVec :: from_elem_n ( None , query_response. variables . len ( ) ) ;
428
428
429
429
// In terms of our example above, we are iterating over pairs like:
@@ -457,7 +457,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
457
457
. enumerate ( )
458
458
. map ( |( index, info) | {
459
459
if info. is_existential ( ) {
460
- match opt_values[ BoundTyIndex :: new ( index) ] {
460
+ match opt_values[ BoundVar :: new ( index) ] {
461
461
Some ( k) => k,
462
462
None => self . instantiate_canonical_var ( cause. span , * info, |u| {
463
463
universe_map[ u. as_usize ( ) ]
@@ -496,7 +496,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
496
496
// canonical variable; this is taken from
497
497
// `query_response.var_values` after applying the substitution
498
498
// `result_subst`.
499
- let substituted_query_response = |index : BoundTyIndex | -> Kind < ' tcx > {
499
+ let substituted_query_response = |index : BoundVar | -> Kind < ' tcx > {
500
500
query_response. substitute_projected ( self . tcx , & result_subst, |v| & v. var_values [ index] )
501
501
} ;
502
502
@@ -552,12 +552,12 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
552
552
cause : & ObligationCause < ' tcx > ,
553
553
param_env : ty:: ParamEnv < ' tcx > ,
554
554
variables1 : & OriginalQueryValues < ' tcx > ,
555
- variables2 : impl Fn ( BoundTyIndex ) -> Kind < ' tcx > ,
555
+ variables2 : impl Fn ( BoundVar ) -> Kind < ' tcx > ,
556
556
) -> InferResult < ' tcx , ( ) > {
557
557
self . commit_if_ok ( |_| {
558
558
let mut obligations = vec ! [ ] ;
559
559
for ( index, value1) in variables1. var_values . iter ( ) . enumerate ( ) {
560
- let value2 = variables2 ( BoundTyIndex :: new ( index) ) ;
560
+ let value2 = variables2 ( BoundVar :: new ( index) ) ;
561
561
562
562
match ( value1. unpack ( ) , value2. unpack ( ) ) {
563
563
( UnpackedKind :: Type ( v1) , UnpackedKind :: Type ( v2) ) => {
0 commit comments