@@ -560,8 +560,8 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
560
560
lifetime_to_bounds. entry ( lifetime) . or_default ( ) . extend ( bounds) ;
561
561
}
562
562
WherePredicate :: EqPredicate { lhs, rhs } => {
563
- match & lhs {
564
- & Type :: QPath { name : ref left_name, ref self_type, ref trait_ } => {
563
+ match lhs {
564
+ Type :: QPath { name : ref left_name, ref self_type, ref trait_ } => {
565
565
let ty = & * self_type;
566
566
match * * trait_ {
567
567
Type :: ResolvedPath {
@@ -580,36 +580,30 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
580
580
continue ;
581
581
}
582
582
583
- // FIXME: Remove this scope when NLL lands
584
- {
585
- let args = & mut new_trait_path
586
- . segments
587
- . last_mut ( )
588
- . expect ( "segments were empty" )
589
- . args ;
590
-
591
- match args {
592
- // Convert somethiung like '<T as Iterator::Item> = u8'
593
- // to 'T: Iterator<Item=u8>'
594
- & mut GenericArgs :: AngleBracketed {
595
- ref mut bindings,
596
- ..
597
- } => {
598
- bindings. push ( TypeBinding {
599
- name : left_name. clone ( ) ,
600
- kind : TypeBindingKind :: Equality { ty : rhs } ,
601
- } ) ;
602
- }
603
- & mut GenericArgs :: Parenthesized { .. } => {
604
- existing_predicates. push (
605
- WherePredicate :: EqPredicate {
606
- lhs : lhs. clone ( ) ,
607
- rhs,
608
- } ,
609
- ) ;
610
- continue ; // If something other than a Fn ends up
611
- // with parenthesis, leave it alone
612
- }
583
+ let args = & mut new_trait_path
584
+ . segments
585
+ . last_mut ( )
586
+ . expect ( "segments were empty" )
587
+ . args ;
588
+
589
+ match args {
590
+ // Convert somethiung like '<T as Iterator::Item> = u8'
591
+ // to 'T: Iterator<Item=u8>'
592
+ GenericArgs :: AngleBracketed {
593
+ ref mut bindings, ..
594
+ } => {
595
+ bindings. push ( TypeBinding {
596
+ name : left_name. clone ( ) ,
597
+ kind : TypeBindingKind :: Equality { ty : rhs } ,
598
+ } ) ;
599
+ }
600
+ GenericArgs :: Parenthesized { .. } => {
601
+ existing_predicates. push ( WherePredicate :: EqPredicate {
602
+ lhs : lhs. clone ( ) ,
603
+ rhs,
604
+ } ) ;
605
+ continue ; // If something other than a Fn ends up
606
+ // with parenthesis, leave it alone
613
607
}
614
608
}
615
609
0 commit comments