@@ -159,7 +159,7 @@ pub(crate) fn format_expr(
159
159
ast:: ExprKind :: Path ( ref qself, ref path) => {
160
160
rewrite_path ( context, PathContext :: Expr , qself. as_ref ( ) , path, shape)
161
161
}
162
- ast:: ExprKind :: Assign ( ref lhs, ref rhs) => {
162
+ ast:: ExprKind :: Assign ( ref lhs, ref rhs, _ ) => {
163
163
rewrite_assignment ( context, lhs, rhs, None , shape)
164
164
}
165
165
ast:: ExprKind :: AssignOp ( ref op, ref lhs, ref rhs) => {
@@ -213,8 +213,8 @@ pub(crate) fn format_expr(
213
213
rewrite_unary_prefix ( context, "return " , & * * expr, shape)
214
214
}
215
215
ast:: ExprKind :: Box ( ref expr) => rewrite_unary_prefix ( context, "box " , & * * expr, shape) ,
216
- ast:: ExprKind :: AddrOf ( mutability, ref expr) => {
217
- rewrite_expr_addrof ( context, mutability, expr, shape)
216
+ ast:: ExprKind :: AddrOf ( borrow_kind , mutability, ref expr) => {
217
+ rewrite_expr_addrof ( context, borrow_kind , mutability, expr, shape)
218
218
}
219
219
ast:: ExprKind :: Cast ( ref expr, ref ty) => rewrite_pair (
220
220
& * * expr,
@@ -1289,7 +1289,7 @@ pub(crate) fn is_simple_expr(expr: &ast::Expr) -> bool {
1289
1289
match expr. kind {
1290
1290
ast:: ExprKind :: Lit ( ..) => true ,
1291
1291
ast:: ExprKind :: Path ( ref qself, ref path) => qself. is_none ( ) && path. segments . len ( ) <= 1 ,
1292
- ast:: ExprKind :: AddrOf ( _, ref expr)
1292
+ ast:: ExprKind :: AddrOf ( _, _ , ref expr)
1293
1293
| ast:: ExprKind :: Box ( ref expr)
1294
1294
| ast:: ExprKind :: Cast ( ref expr, _)
1295
1295
| ast:: ExprKind :: Field ( ref expr, _)
@@ -1347,7 +1347,7 @@ pub(crate) fn can_be_overflowed_expr(
1347
1347
}
1348
1348
1349
1349
// Handle unary-like expressions
1350
- ast:: ExprKind :: AddrOf ( _, ref expr)
1350
+ ast:: ExprKind :: AddrOf ( _, _ , ref expr)
1351
1351
| ast:: ExprKind :: Box ( ref expr)
1352
1352
| ast:: ExprKind :: Try ( ref expr)
1353
1353
| ast:: ExprKind :: Unary ( _, ref expr)
@@ -1359,7 +1359,7 @@ pub(crate) fn can_be_overflowed_expr(
1359
1359
pub ( crate ) fn is_nested_call ( expr : & ast:: Expr ) -> bool {
1360
1360
match expr. kind {
1361
1361
ast:: ExprKind :: Call ( ..) | ast:: ExprKind :: Mac ( ..) => true ,
1362
- ast:: ExprKind :: AddrOf ( _, ref expr)
1362
+ ast:: ExprKind :: AddrOf ( _, _ , ref expr)
1363
1363
| ast:: ExprKind :: Box ( ref expr)
1364
1364
| ast:: ExprKind :: Try ( ref expr)
1365
1365
| ast:: ExprKind :: Unary ( _, ref expr)
@@ -2035,6 +2035,7 @@ pub(crate) fn prefer_next_line(
2035
2035
2036
2036
fn rewrite_expr_addrof (
2037
2037
context : & RewriteContext < ' _ > ,
2038
+ _borrow_kind : ast:: BorrowKind ,
2038
2039
mutability : ast:: Mutability ,
2039
2040
expr : & ast:: Expr ,
2040
2041
shape : Shape ,
@@ -2049,7 +2050,7 @@ fn rewrite_expr_addrof(
2049
2050
pub ( crate ) fn is_method_call ( expr : & ast:: Expr ) -> bool {
2050
2051
match expr. kind {
2051
2052
ast:: ExprKind :: MethodCall ( ..) => true ,
2052
- ast:: ExprKind :: AddrOf ( _, ref expr)
2053
+ ast:: ExprKind :: AddrOf ( _, _ , ref expr)
2053
2054
| ast:: ExprKind :: Box ( ref expr)
2054
2055
| ast:: ExprKind :: Cast ( ref expr, _)
2055
2056
| ast:: ExprKind :: Try ( ref expr)
0 commit comments