@@ -236,7 +236,6 @@ pub(crate) fn format_expr(
236
236
ast:: ExprKind :: Yeet ( Some ( ref expr) ) => {
237
237
rewrite_unary_prefix ( context, "do yeet " , & * * expr, shape)
238
238
}
239
- ast:: ExprKind :: Box ( ref expr) => rewrite_unary_prefix ( context, "box " , & * * expr, shape) ,
240
239
ast:: ExprKind :: AddrOf ( borrow_kind, mutability, ref expr) => {
241
240
rewrite_expr_addrof ( context, borrow_kind, mutability, expr, shape)
242
241
}
@@ -1299,7 +1298,6 @@ pub(crate) fn is_simple_expr(expr: &ast::Expr) -> bool {
1299
1298
ast:: ExprKind :: Lit ( ..) => true ,
1300
1299
ast:: ExprKind :: Path ( ref qself, ref path) => qself. is_none ( ) && path. segments . len ( ) <= 1 ,
1301
1300
ast:: ExprKind :: AddrOf ( _, _, ref expr)
1302
- | ast:: ExprKind :: Box ( ref expr)
1303
1301
| ast:: ExprKind :: Cast ( ref expr, _)
1304
1302
| ast:: ExprKind :: Field ( ref expr, _)
1305
1303
| ast:: ExprKind :: Try ( ref expr)
@@ -1361,7 +1359,6 @@ pub(crate) fn can_be_overflowed_expr(
1361
1359
1362
1360
// Handle unary-like expressions
1363
1361
ast:: ExprKind :: AddrOf ( _, _, ref expr)
1364
- | ast:: ExprKind :: Box ( ref expr)
1365
1362
| ast:: ExprKind :: Try ( ref expr)
1366
1363
| ast:: ExprKind :: Unary ( _, ref expr)
1367
1364
| ast:: ExprKind :: Cast ( ref expr, _) => can_be_overflowed_expr ( context, expr, args_len) ,
@@ -1373,7 +1370,6 @@ pub(crate) fn is_nested_call(expr: &ast::Expr) -> bool {
1373
1370
match expr. kind {
1374
1371
ast:: ExprKind :: Call ( ..) | ast:: ExprKind :: MacCall ( ..) => true ,
1375
1372
ast:: ExprKind :: AddrOf ( _, _, ref expr)
1376
- | ast:: ExprKind :: Box ( ref expr)
1377
1373
| ast:: ExprKind :: Try ( ref expr)
1378
1374
| ast:: ExprKind :: Unary ( _, ref expr)
1379
1375
| ast:: ExprKind :: Cast ( ref expr, _) => is_nested_call ( expr) ,
@@ -2133,7 +2129,6 @@ pub(crate) fn is_method_call(expr: &ast::Expr) -> bool {
2133
2129
match expr. kind {
2134
2130
ast:: ExprKind :: MethodCall ( ..) => true ,
2135
2131
ast:: ExprKind :: AddrOf ( _, _, ref expr)
2136
- | ast:: ExprKind :: Box ( ref expr)
2137
2132
| ast:: ExprKind :: Cast ( ref expr, _)
2138
2133
| ast:: ExprKind :: Try ( ref expr)
2139
2134
| ast:: ExprKind :: Unary ( _, ref expr) => is_method_call ( expr) ,
0 commit comments