@@ -60,7 +60,7 @@ pub(crate) fn check_match(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), Err
6060 } ;
6161
6262 for param in thir. params . iter ( ) {
63- if let Some ( box ref pattern) = param. pat {
63+ if let Some ( ref pattern) = param. pat {
6464 visitor. check_binding_is_irrefutable ( pattern, origin, None , None ) ;
6565 }
6666 }
@@ -149,16 +149,16 @@ impl<'p, 'tcx> Visitor<'p, 'tcx> for MatchVisitor<'p, 'tcx> {
149149 }
150150 return ;
151151 }
152- ExprKind :: Match { scrutinee, box ref arms, match_source } => {
152+ ExprKind :: Match { scrutinee, ref arms, match_source } => {
153153 self . check_match ( scrutinee, arms, match_source, ex. span ) ;
154154 }
155155 ExprKind :: LoopMatch {
156- match_data : box LoopMatchMatchData { scrutinee, box ref arms, span } ,
156+ match_data : LoopMatchMatchData { scrutinee, ref arms, span } ,
157157 ..
158158 } => {
159159 self . check_match ( scrutinee, arms, MatchSource :: Normal , span) ;
160160 }
161- ExprKind :: Let { box ref pat, expr } => {
161+ ExprKind :: Let { ref pat, expr } => {
162162 self . check_let ( pat, Some ( expr) , ex. span , None ) ;
163163 }
164164 ExprKind :: LogicalOp { op : LogicalOp :: And , .. }
@@ -179,7 +179,7 @@ impl<'p, 'tcx> Visitor<'p, 'tcx> for MatchVisitor<'p, 'tcx> {
179179
180180 fn visit_stmt ( & mut self , stmt : & ' p Stmt < ' tcx > ) {
181181 match stmt. kind {
182- StmtKind :: Let { box ref pattern, initializer, else_block, hir_id, span, .. } => {
182+ StmtKind :: Let { ref pattern, initializer, else_block, hir_id, span, .. } => {
183183 self . with_hir_source ( hir_id, |this| {
184184 let let_source =
185185 if else_block. is_some ( ) { LetSource :: LetElse } else { LetSource :: PlainLet } ;
@@ -251,7 +251,7 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
251251 ExprKind :: Scope { value, hir_id, .. } => {
252252 self . with_hir_source ( hir_id, |this| this. visit_land_rhs ( & this. thir [ value] ) )
253253 }
254- ExprKind :: Let { box ref pat, expr } => {
254+ ExprKind :: Let { ref pat, expr } => {
255255 let expr = & self . thir ( ) [ expr] ;
256256 self . with_let_source ( LetSource :: None , |this| {
257257 this. visit_expr ( expr) ;
@@ -466,7 +466,7 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
466466 && self . tcx . is_diagnostic_item ( rustc_span:: sym:: Option , s_ty. did ( ) )
467467 && let ExprKind :: Scope { value, .. } = initializer. kind
468468 && let initializer_expr = & self . thir [ value]
469- && let ExprKind :: Adt ( box AdtExpr { fields, .. } ) = & initializer_expr. kind
469+ && let ExprKind :: Adt ( AdtExpr { fields, .. } ) = & initializer_expr. kind
470470 && let Some ( field) = fields. first ( )
471471 && let inner = & self . thir [ field. expr ]
472472 && let Some ( inner_ty) = inner. ty . ty_adt_def ( )
@@ -754,7 +754,7 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
754754/// This analysis is *not* subsumed by NLL.
755755fn check_borrow_conflicts_in_at_patterns < ' tcx > ( cx : & MatchVisitor < ' _ , ' tcx > , pat : & Pat < ' tcx > ) {
756756 // Extract `sub` in `binding @ sub`.
757- let PatKind :: Binding { name, mode, ty, subpattern : Some ( box ref sub) , .. } = pat. kind else {
757+ let PatKind :: Binding { name, mode, ty, subpattern : Some ( ref sub) , .. } = pat. kind else {
758758 return ;
759759 } ;
760760
0 commit comments