Implement .use keyword as an alias of clone
This commit is contained in:
parent
0cf8dbc96c
commit
05c516446a
36 changed files with 247 additions and 24 deletions
|
@ -159,7 +159,10 @@ fn is_temporary_rvalue(expr: &Expr<'_>) -> bool {
|
|||
ExprKind::Path(..) => false,
|
||||
|
||||
// Calls return rvalues.
|
||||
ExprKind::Call(..) | ExprKind::MethodCall(..) | ExprKind::Binary(..) => true,
|
||||
ExprKind::Call(..)
|
||||
| ExprKind::MethodCall(..)
|
||||
| ExprKind::Use(..)
|
||||
| ExprKind::Binary(..) => true,
|
||||
|
||||
// Inner blocks are rvalues.
|
||||
ExprKind::If(..) | ExprKind::Loop(..) | ExprKind::Match(..) | ExprKind::Block(..) => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue