@@ -613,19 +613,17 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
613
613
/// - Inline const blocks (e.g. `const { 1 + 1 }`)
614
614
/// - Literals, possibly negated (e.g. `-128u8`, `"hello"`)
615
615
fn lower_pat_expr ( & mut self , expr : & ' tcx hir:: PatExpr < ' tcx > ) -> PatKind < ' tcx > {
616
- let ( lit, neg) = match & expr. kind {
617
- hir:: PatExprKind :: Path ( qpath) => {
618
- return self . lower_path ( qpath, expr. hir_id , expr. span ) . kind ;
619
- }
616
+ match & expr. kind {
617
+ hir:: PatExprKind :: Path ( qpath) => self . lower_path ( qpath, expr. hir_id , expr. span ) . kind ,
620
618
hir:: PatExprKind :: ConstBlock ( anon_const) => {
621
- return self . lower_inline_const ( anon_const, expr. hir_id , expr. span ) ;
619
+ self . lower_inline_const ( anon_const, expr. hir_id , expr. span )
622
620
}
623
- hir:: PatExprKind :: Lit { lit, negated } => ( lit , * negated ) ,
624
- } ;
625
-
626
- let ct_ty = self . typeck_results . node_type ( expr. hir_id ) ;
627
- let lit_input = LitToConstInput { lit : & lit . node , ty : ct_ty, neg } ;
628
- let constant = self . tcx . at ( expr . span ) . lit_to_const ( lit_input ) ;
629
- self . const_to_pat ( constant , ct_ty , expr . hir_id , lit . span ) . kind
621
+ hir:: PatExprKind :: Lit { lit, negated } => {
622
+ let ct_ty = self . typeck_results . node_type ( expr . hir_id ) ;
623
+ let lit_input = LitToConstInput { lit : & lit . node , ty : ct_ty , neg : * negated } ;
624
+ let constant = self . tcx . at ( expr. span ) . lit_to_const ( lit_input ) ;
625
+ self . const_to_pat ( constant , ct_ty, expr . hir_id , lit . span ) . kind
626
+ }
627
+ }
630
628
}
631
629
}
0 commit comments