@@ -1239,16 +1239,16 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
12391239 let bounds =
12401240 this. arena . alloc_from_iter ( bounds. iter ( ) . filter_map (
12411241 |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 ( ) ) ) ,
12461246 // `?const ?Bound` will cause an error during AST validation
12471247 // 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 ,
12521252 GenericBound :: Outlives ( ref lifetime) => {
12531253 if lifetime_bound. is_none ( ) {
12541254 lifetime_bound = Some ( this. lower_lifetime ( lifetime) ) ;
@@ -1740,8 +1740,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
17401740 c_variadic,
17411741 implicit_self : decl. inputs . get ( 0 ) . map_or ( hir:: ImplicitSelfKind :: None , |arg| {
17421742 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+ }
17451746 _ => false ,
17461747 } ;
17471748
@@ -2468,7 +2469,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
24682469 hir:: QPath :: Resolved ( None , path) => {
24692470 // Turn trait object paths into `TyKind::TraitObject` instead.
24702471 match path. res {
2471- Res :: Def ( DefKind :: Trait , _ ) | Res :: Def ( DefKind :: TraitAlias , _) => {
2472+ Res :: Def ( DefKind :: Trait | DefKind :: TraitAlias , _) => {
24722473 let principal = hir:: PolyTraitRef {
24732474 bound_generic_params : & [ ] ,
24742475 trait_ref : hir:: TraitRef { path, hir_ref_id : hir_id } ,
0 commit comments