@@ -236,7 +236,6 @@ pub(crate) fn format_expr(
236236 ast:: ExprKind :: Yeet ( Some ( ref expr) ) => {
237237 rewrite_unary_prefix ( context, "do yeet " , & * * expr, shape)
238238 }
239- ast:: ExprKind :: Box ( ref expr) => rewrite_unary_prefix ( context, "box " , & * * expr, shape) ,
240239 ast:: ExprKind :: AddrOf ( borrow_kind, mutability, ref expr) => {
241240 rewrite_expr_addrof ( context, borrow_kind, mutability, expr, shape)
242241 }
@@ -1299,7 +1298,6 @@ pub(crate) fn is_simple_expr(expr: &ast::Expr) -> bool {
12991298 ast:: ExprKind :: Lit ( ..) => true ,
13001299 ast:: ExprKind :: Path ( ref qself, ref path) => qself. is_none ( ) && path. segments . len ( ) <= 1 ,
13011300 ast:: ExprKind :: AddrOf ( _, _, ref expr)
1302- | ast:: ExprKind :: Box ( ref expr)
13031301 | ast:: ExprKind :: Cast ( ref expr, _)
13041302 | ast:: ExprKind :: Field ( ref expr, _)
13051303 | ast:: ExprKind :: Try ( ref expr)
@@ -1361,7 +1359,6 @@ pub(crate) fn can_be_overflowed_expr(
13611359
13621360 // Handle unary-like expressions
13631361 ast:: ExprKind :: AddrOf ( _, _, ref expr)
1364- | ast:: ExprKind :: Box ( ref expr)
13651362 | ast:: ExprKind :: Try ( ref expr)
13661363 | ast:: ExprKind :: Unary ( _, ref expr)
13671364 | 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 {
13731370 match expr. kind {
13741371 ast:: ExprKind :: Call ( ..) | ast:: ExprKind :: MacCall ( ..) => true ,
13751372 ast:: ExprKind :: AddrOf ( _, _, ref expr)
1376- | ast:: ExprKind :: Box ( ref expr)
13771373 | ast:: ExprKind :: Try ( ref expr)
13781374 | ast:: ExprKind :: Unary ( _, ref expr)
13791375 | ast:: ExprKind :: Cast ( ref expr, _) => is_nested_call ( expr) ,
@@ -2133,7 +2129,6 @@ pub(crate) fn is_method_call(expr: &ast::Expr) -> bool {
21332129 match expr. kind {
21342130 ast:: ExprKind :: MethodCall ( ..) => true ,
21352131 ast:: ExprKind :: AddrOf ( _, _, ref expr)
2136- | ast:: ExprKind :: Box ( ref expr)
21372132 | ast:: ExprKind :: Cast ( ref expr, _)
21382133 | ast:: ExprKind :: Try ( ref expr)
21392134 | ast:: ExprKind :: Unary ( _, ref expr) => is_method_call ( expr) ,
0 commit comments