@@ -1239,16 +1239,16 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1239
1239
let bounds =
1240
1240
this. arena . alloc_from_iter ( bounds. iter ( ) . filter_map (
1241
1241
|bound| match * bound {
1242
- GenericBound :: Trait ( ref ty , TraitBoundModifier :: None )
1243
- | GenericBound :: Trait ( ref ty , TraitBoundModifier :: MaybeConst ) => {
1244
- Some ( this . lower_poly_trait_ref ( ty , itctx . reborrow ( ) ) )
1245
- }
1242
+ GenericBound :: Trait (
1243
+ ref ty ,
1244
+ TraitBoundModifier :: None | TraitBoundModifier :: MaybeConst ,
1245
+ ) => Some ( this . lower_poly_trait_ref ( ty , itctx . reborrow ( ) ) ) ,
1246
1246
// `?const ?Bound` will cause an error during AST validation
1247
1247
// anyways, so treat it like `?Bound` as compilation proceeds.
1248
- GenericBound :: Trait ( _ , TraitBoundModifier :: Maybe )
1249
- | GenericBound :: Trait ( _ , TraitBoundModifier :: MaybeConstMaybe ) => {
1250
- None
1251
- }
1248
+ GenericBound :: Trait (
1249
+ _ ,
1250
+ TraitBoundModifier :: Maybe | TraitBoundModifier :: MaybeConstMaybe ,
1251
+ ) => None ,
1252
1252
GenericBound :: Outlives ( ref lifetime) => {
1253
1253
if lifetime_bound. is_none ( ) {
1254
1254
lifetime_bound = Some ( this. lower_lifetime ( lifetime) ) ;
@@ -1740,8 +1740,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1740
1740
c_variadic,
1741
1741
implicit_self : decl. inputs . get ( 0 ) . map_or ( hir:: ImplicitSelfKind :: None , |arg| {
1742
1742
let is_mutable_pat = match arg. pat . kind {
1743
- PatKind :: Ident ( BindingMode :: ByValue ( mt) , _, _)
1744
- | PatKind :: Ident ( BindingMode :: ByRef ( mt) , _, _) => mt == Mutability :: Mut ,
1743
+ PatKind :: Ident ( BindingMode :: ByValue ( mt) | BindingMode :: ByRef ( mt) , _, _) => {
1744
+ mt == Mutability :: Mut
1745
+ }
1745
1746
_ => false ,
1746
1747
} ;
1747
1748
@@ -2468,7 +2469,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
2468
2469
hir:: QPath :: Resolved ( None , path) => {
2469
2470
// Turn trait object paths into `TyKind::TraitObject` instead.
2470
2471
match path. res {
2471
- Res :: Def ( DefKind :: Trait , _ ) | Res :: Def ( DefKind :: TraitAlias , _) => {
2472
+ Res :: Def ( DefKind :: Trait | DefKind :: TraitAlias , _) => {
2472
2473
let principal = hir:: PolyTraitRef {
2473
2474
bound_generic_params : & [ ] ,
2474
2475
trait_ref : hir:: TraitRef { path, hir_ref_id : hir_id } ,
0 commit comments