Skip to content

What is 6th unary operator? #20876

Closed
@khiri-co

Description

@khiri-co

In reference 7.2.11 Unary operator expressions

Rust defines six symbolic unary operators.

But in document there is only 5 ops; '-', '*', '!', 'box', '&'.
What is the 6th unary op?

By the way, in Rust '+' is not an unary op. So this expression is invalid; 'let a = +(1+2);'.
Considering the symmetry of "+" & '-', I think '+' may be an unary operator.
Of course, '+' unary op has no effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions