/// Check if something is a valid Rust lvalue. Inspired by `librustc::ty::expr_is_lval`.
Check if something is a valid Rust lvalue.
Check if something is a valid Rust lvalue .
fn is_lvalue(e: &Expr) -> bool {
            match e.node {
                ExprKind::Path(..) |
                ExprKind::Unary(ast::UnOp::Deref, _) |
                ExprKind::Field(..) |
                ExprKind::Index(..) => true,
                _ => false,
            }
        }
fn is_lvalue ( e : & Expr ) -> bool { match e . node { ExprKind :: Path ( .. ) | ExprKind :: Unary ( ast :: UnOp :: Deref , _ ) | ExprKind :: Field ( .. ) | ExprKind :: Index ( .. ) => true , _ => false , } }
Check if something is a valid Rust lvalue.
Check if something is a valid Rust lvalue .
e
&Expr