Skip to content

Commit 78a0cde

Browse files
committed
Format in-place expression like assignment
1 parent 6aae9d8 commit 78a0cde

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/expr.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,10 @@ pub fn format_expr(
338338
))
339339
}
340340
}
341-
// FIXME(#2743)
342-
ast::ExprKind::ObsoleteInPlace(..) => unimplemented!(),
341+
ast::ExprKind::ObsoleteInPlace(ref lhs, ref rhs) => lhs
342+
.rewrite(context, shape)
343+
.map(|s| s + " <-")
344+
.and_then(|lhs| rewrite_assign_rhs(context, lhs, &**rhs, shape)),
343345
ast::ExprKind::Async(capture_by, _node_id, ref block) => {
344346
let mover = if capture_by == ast::CaptureBy::Value {
345347
"move "

0 commit comments

Comments
 (0)