Enum rustc_ast::util::parser::AssocOp [−][src]
pub enum AssocOp {
Show 24 variants
Add,
Subtract,
Multiply,
Divide,
Modulus,
LAnd,
LOr,
BitXor,
BitAnd,
BitOr,
ShiftLeft,
ShiftRight,
Equal,
Less,
LessEqual,
NotEqual,
Greater,
GreaterEqual,
Assign,
AssignOp(BinOpToken),
As,
DotDot,
DotDotEq,
Colon,
}
Expand description
Associative operator with precedence.
This is the enum which specifies operator precedence and fixity to the parser.
Variants
+
-
*
/
%
&&
||
^
&
|
<<
>>
==
<
<=
!=
>
>=
=
AssignOp(BinOpToken)
?=
where ? is one of the BinOpToken
Tuple Fields of AssignOp
0: BinOpToken
as
..
range
..=
range
:
Implementations
Creates a new AssocOP from a token
Creates a new AssocOp from ast::BinOpKind.
Gets the precedence of this operator
This operator could be used to follow a block unambiguously.
This is used for error recovery at the moment, providing a suggestion to wrap blocks with parentheses while having a high degree of confidence on the correctness of the suggestion.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AssocOp
impl UnwindSafe for AssocOp
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Add
: 0 bytesSubtract
: 0 bytesMultiply
: 0 bytesDivide
: 0 bytesModulus
: 0 bytesLAnd
: 0 bytesLOr
: 0 bytesBitXor
: 0 bytesBitAnd
: 0 bytesBitOr
: 0 bytesShiftLeft
: 0 bytesShiftRight
: 0 bytesEqual
: 0 bytesLess
: 0 bytesLessEqual
: 0 bytesNotEqual
: 0 bytesGreater
: 0 bytesGreaterEqual
: 0 bytesAssign
: 0 bytesAssignOp
: 1 byteAs
: 0 bytesDotDot
: 0 bytesDotDotEq
: 0 bytesColon
: 0 bytes