File tree 1 file changed +5
-20
lines changed
compiler/rustc_builtin_macros/src/deriving/generic
1 file changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -609,28 +609,13 @@ impl<'a> TraitDef<'a> {
609
609
610
610
// and similarly for where clauses
611
611
where_clause. predicates . extend ( generics. where_clause . predicates . iter ( ) . map ( |clause| {
612
- match * clause {
613
- ast:: WherePredicate :: BoundPredicate ( ref wb) => {
614
- ast:: WherePredicate :: BoundPredicate ( ast:: WhereBoundPredicate {
615
- span : wb. span ,
616
- bound_generic_params : wb. bound_generic_params . clone ( ) ,
617
- bounded_ty : wb. bounded_ty . clone ( ) ,
618
- bounds : wb. bounds . to_vec ( ) ,
619
- } )
620
- }
621
- ast:: WherePredicate :: RegionPredicate ( ref rb) => {
622
- ast:: WherePredicate :: RegionPredicate ( ast:: WhereRegionPredicate {
623
- span : rb. span ,
624
- lifetime : rb. lifetime ,
625
- bounds : rb. bounds . to_vec ( ) ,
626
- } )
627
- }
628
- ast:: WherePredicate :: EqPredicate ( ref we) => {
612
+ match clause {
613
+ ast:: WherePredicate :: BoundPredicate ( _)
614
+ | ast:: WherePredicate :: RegionPredicate ( _) => clause. clone ( ) ,
615
+ ast:: WherePredicate :: EqPredicate ( we) => {
629
616
ast:: WherePredicate :: EqPredicate ( ast:: WhereEqPredicate {
630
617
id : ast:: DUMMY_NODE_ID ,
631
- span : we. span ,
632
- lhs_ty : we. lhs_ty . clone ( ) ,
633
- rhs_ty : we. rhs_ty . clone ( ) ,
618
+ ..we. clone ( )
634
619
} )
635
620
}
636
621
}
You can’t perform that action at this time.
0 commit comments