+ |
Plus |
addition, trait bounds, macro Kleene matcher
|
- |
Minus |
subtraction, negation
|
* |
Star |
multiplication, dereference, raw pointers, macro Kleene matcher, glob imports
|
/ |
Slash |
division |
% |
Percent |
remainder |
^ |
Caret |
bitwise and logical XOR |
! |
Not |
bitwise and logical NOT, macro calls, inner attributes, never type, negative impls
|
& |
And |
bitwise and logical AND, borrow, references, reference patterns
|
| |
Or |
bitwise and logical OR, closures, or patterns, if let, while let
|
&& |
AndAnd |
lazy AND, borrow, references, reference patterns
|
|| |
OrOr |
lazy OR, closures
|
<< |
Shl |
shift left, nested generics
|
>> |
Shr |
shift right, nested generics
|
+= |
PlusEq |
addition assignment |
-= |
MinusEq |
subtraction assignment |
*= |
StarEq |
multiplication assignment |
/= |
SlashEq |
division assignment |
%= |
PercentEq |
remainder assignment |
^= |
CaretEq |
bitwise XOR assignment |
&= |
AndEq |
bitwise AND assignment |
|= |
OrEq |
bitwise OR assignment |
<<= |
ShlEq |
shift left assignment |
>>= |
ShrEq |
shift right assignment, nested generics
|
= |
Eq |
assignment, let statements, attributes, various type definitions |
== |
EqEq |
equal |
!= |
Ne |
not equal |
> |
Gt |
greater than, generics, paths, use bounds
|
< |
Lt |
less than, generics, paths, use bounds
|
>= |
Ge |
greater than or equal to, generics
|
<= |
Le |
less than or equal to |
@ |
At |
subpattern binding |
. |
Dot |
field access, tuple index
|
.. |
DotDot |
range expressions, struct expressions, rest pattern, range patterns, struct patterns
|
... |
DotDotDot |
variadic functions, range patterns
|
..= |
DotDotEq |
inclusive range expressions, range patterns
|
, |
Comma |
various separators |
; |
Semi |
terminator for various items and statements, array expressions, array types
|
: |
Colon |
various separators |
:: |
PathSep |
path separator |
-> |
RArrow |
functions, closures, function pointer type
|
=> |
FatArrow |
match arms, macros
|
<- |
LArrow |
The left arrow symbol has been unused since before Rust 1.0, but it is still treated as a single token. |
# |
Pound |
attributes, raw string literals, raw byte string literals, raw C string literals
|
$ |
Dollar |
macros |
? |
Question |
try propagation expressions, relaxed trait bounds, macro Kleene matcher
|
~ |
Tilde |
The tilde operator has been unused since before Rust 1.0, but its token may still be used. |