@@ -641,21 +641,19 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for IsSuggestableVisitor<'tcx> {
641
641
}
642
642
}
643
643
644
- Alias ( Projection , AliasTy { def_id, .. } ) => {
645
- if self . tcx . def_kind ( def_id) != DefKind :: AssocTy {
646
- return ControlFlow :: Break ( ( ) ) ;
647
- }
644
+ Alias ( Projection , AliasTy { def_id, .. } )
645
+ if self . tcx . def_kind ( def_id) != DefKind :: AssocTy =>
646
+ {
647
+ return ControlFlow :: Break ( ( ) ) ;
648
648
}
649
649
650
- Param ( param) => {
651
- // FIXME: It would be nice to make this not use string manipulation,
652
- // but it's pretty hard to do this, since `ty::ParamTy` is missing
653
- // sufficient info to determine if it is synthetic, and we don't
654
- // always have a convenient way of getting `ty::Generics` at the call
655
- // sites we invoke `IsSuggestable::is_suggestable`.
656
- if param. name . as_str ( ) . starts_with ( "impl " ) {
657
- return ControlFlow :: Break ( ( ) ) ;
658
- }
650
+ // FIXME: It would be nice to make this not use string manipulation,
651
+ // but it's pretty hard to do this, since `ty::ParamTy` is missing
652
+ // sufficient info to determine if it is synthetic, and we don't
653
+ // always have a convenient way of getting `ty::Generics` at the call
654
+ // sites we invoke `IsSuggestable::is_suggestable`.
655
+ Param ( param) if param. name . as_str ( ) . starts_with ( "impl " ) => {
656
+ return ControlFlow :: Break ( ( ) ) ;
659
657
}
660
658
661
659
_ => { }
@@ -733,17 +731,13 @@ impl<'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for MakeSuggestableFolder<'tcx> {
733
731
}
734
732
}
735
733
736
- Param ( param) => {
737
- // FIXME: It would be nice to make this not use string manipulation,
738
- // but it's pretty hard to do this, since `ty::ParamTy` is missing
739
- // sufficient info to determine if it is synthetic, and we don't
740
- // always have a convenient way of getting `ty::Generics` at the call
741
- // sites we invoke `IsSuggestable::is_suggestable`.
742
- if param. name . as_str ( ) . starts_with ( "impl " ) {
743
- return Err ( ( ) ) ;
744
- }
745
-
746
- t
734
+ // FIXME: It would be nice to make this not use string manipulation,
735
+ // but it's pretty hard to do this, since `ty::ParamTy` is missing
736
+ // sufficient info to determine if it is synthetic, and we don't
737
+ // always have a convenient way of getting `ty::Generics` at the call
738
+ // sites we invoke `IsSuggestable::is_suggestable`.
739
+ Param ( param) if param. name . as_str ( ) . starts_with ( "impl " ) => {
740
+ return Err ( ( ) ) ;
747
741
}
748
742
749
743
_ => t,
0 commit comments