@@ -1257,7 +1257,7 @@ fn is_unsized<'gcx: 'tcx, 'tcx>(astconv: &AstConv<'gcx, 'tcx>,
12571257 // Try to find an unbound in bounds.
12581258 let mut unbound = None ;
12591259 for ab in ast_bounds {
1260- if let & hir:: TraitTyParamBound ( ref ptr, hir:: TraitBoundModifier :: Maybe ) = ab {
1260+ if let & hir:: ParamBound :: Trait ( ref ptr, hir:: TraitBoundModifier :: Maybe ) = ab {
12611261 if unbound. is_none ( ) {
12621262 unbound = Some ( ptr. trait_ref . clone ( ) ) ;
12631263 } else {
@@ -1482,7 +1482,7 @@ pub fn explicit_predicates_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
14821482
14831483 for bound in bound_pred. bounds . iter ( ) {
14841484 match bound {
1485- & hir:: ParamBound :: TraitTyParamBound ( ref poly_trait_ref, _) => {
1485+ & hir:: ParamBound :: Trait ( ref poly_trait_ref, _) => {
14861486 let mut projections = Vec :: new ( ) ;
14871487
14881488 let trait_ref =
@@ -1591,22 +1591,16 @@ pub fn compute_bounds<'gcx: 'tcx, 'tcx>(astconv: &AstConv<'gcx, 'tcx>,
15911591 let mut trait_bounds = vec ! [ ] ;
15921592 for ast_bound in ast_bounds {
15931593 match * ast_bound {
1594- hir:: TraitTyParamBound ( ref b, hir:: TraitBoundModifier :: None ) => {
1595- trait_bounds. push ( b) ;
1596- }
1597- hir:: TraitTyParamBound ( _, hir:: TraitBoundModifier :: Maybe ) => { }
1598- hir:: Outlives ( ref l) => {
1599- region_bounds. push ( l) ;
1600- }
1594+ hir:: ParamBound :: Trait ( ref b, hir:: TraitBoundModifier :: None ) => trait_bounds. push ( b) ,
1595+ hir:: ParamBound :: Trait ( _, hir:: TraitBoundModifier :: Maybe ) => { }
1596+ hir:: ParamBound :: Outlives ( ref l) => region_bounds. push ( l) ,
16011597 }
16021598 }
16031599
16041600 let mut projection_bounds = vec ! [ ] ;
16051601
16061602 let mut trait_bounds: Vec < _ > = trait_bounds. iter ( ) . map ( |& bound| {
1607- astconv. instantiate_poly_trait_ref ( bound,
1608- param_ty,
1609- & mut projection_bounds)
1603+ astconv. instantiate_poly_trait_ref ( bound, param_ty, & mut projection_bounds)
16101604 } ) . collect ( ) ;
16111605
16121606 let region_bounds = region_bounds. into_iter ( ) . map ( |r| {
@@ -1640,7 +1634,7 @@ fn predicates_from_bound<'tcx>(astconv: &AstConv<'tcx, 'tcx>,
16401634 -> Vec < ty:: Predicate < ' tcx > >
16411635{
16421636 match * bound {
1643- hir:: TraitTyParamBound ( ref tr, hir:: TraitBoundModifier :: None ) => {
1637+ hir:: ParamBound :: Trait ( ref tr, hir:: TraitBoundModifier :: None ) => {
16441638 let mut projections = Vec :: new ( ) ;
16451639 let pred = astconv. instantiate_poly_trait_ref ( tr,
16461640 param_ty,
@@ -1650,14 +1644,12 @@ fn predicates_from_bound<'tcx>(astconv: &AstConv<'tcx, 'tcx>,
16501644 . chain ( Some ( pred. to_predicate ( ) ) )
16511645 . collect ( )
16521646 }
1653- hir:: Outlives ( ref lifetime) => {
1647+ hir:: ParamBound :: Outlives ( ref lifetime) => {
16541648 let region = astconv. ast_region_to_region ( lifetime, None ) ;
16551649 let pred = ty:: Binder :: bind ( ty:: OutlivesPredicate ( param_ty, region) ) ;
16561650 vec ! [ ty:: Predicate :: TypeOutlives ( pred) ]
16571651 }
1658- hir:: TraitTyParamBound ( _, hir:: TraitBoundModifier :: Maybe ) => {
1659- Vec :: new ( )
1660- }
1652+ hir:: ParamBound :: Trait ( _, hir:: TraitBoundModifier :: Maybe ) => vec ! [ ] ,
16611653 }
16621654}
16631655
0 commit comments