Implement .use keyword as an alias of clone

This commit is contained in:
Santiago Pastorino
2024-10-02 16:35:37 -03:00
parent 0cf8dbc96c
commit 05c516446a
36 changed files with 247 additions and 24 deletions

View File

@@ -1544,6 +1544,10 @@ impl<'a> State<'a> {
hir::ExprKind::MethodCall(segment, receiver, args, _) => {
self.print_expr_method_call(segment, receiver, args);
}
hir::ExprKind::Use(expr, _) => {
self.print_expr(expr);
self.word(".use");
}
hir::ExprKind::Binary(op, lhs, rhs) => {
self.print_expr_binary(op, lhs, rhs);
}