@@ -8,7 +8,7 @@ use rustc_infer::infer::InferCtxt;
88use rustc_middle:: ty:: {
99 fold:: { BottomUpFolder , TypeFoldable , TypeFolder } ,
1010 subst:: { GenericArg , InternalSubsts , SubstsRef } ,
11- GenericParamDefKind , ParamEnv , Predicate , Region , TraitRef , Ty , TyCtxt , Unevaluated ,
11+ GenericParamDefKind , ParamEnv , Predicate , Region , Term , TraitRef , Ty , TyCtxt , Unevaluated ,
1212} ;
1313use std:: collections:: HashMap ;
1414
@@ -261,7 +261,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
261261 substs : self
262262 . tcx
263263 . intern_substs ( & target_substs[ 1 ..] ) ,
264- ty ,
264+ term : Term :: Ty ( ty ) ,
265265 } )
266266 } else {
267267 success. set ( false ) ;
@@ -420,7 +420,10 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
420420 substs : target_substs,
421421 item_def_id : target_def_id,
422422 } ,
423- ty : self . translate ( index_map, pred. ty ) ,
423+ term : match pred. term {
424+ Term :: Ty ( ty) => Term :: Ty ( self . translate ( index_map, ty) ) ,
425+ Term :: Const ( _) => pred. term ,
426+ } ,
424427 }
425428 } else {
426429 return None ;
0 commit comments