Enum rustc_middle::mir::BinOp
source · [−]pub enum BinOp {
Show 17 variants
Add,
Sub,
Mul,
Div,
Rem,
BitXor,
BitAnd,
BitOr,
Shl,
Shr,
Eq,
Lt,
Le,
Ne,
Ge,
Gt,
Offset,
}Variants
Add
The + operator (addition)
Sub
The - operator (subtraction)
Mul
The * operator (multiplication)
Div
The / operator (division)
Division by zero is UB.
Rem
The % operator (modulus)
Using zero as the modulus (second operand) is UB.
BitXor
The ^ operator (bitwise xor)
BitAnd
The & operator (bitwise and)
BitOr
The | operator (bitwise or)
Shl
The << operator (shift left)
The offset is truncated to the size of the first operand before shifting.
Shr
The >> operator (shift right)
The offset is truncated to the size of the first operand before shifting.
Eq
The == operator (equality)
Lt
The < operator (less than)
Le
The <= operator (less than or equal to)
Ne
The != operator (not equal to)
Ge
The >= operator (greater than or equal to)
Gt
The > operator (greater than)
Offset
The ptr.offset operator
Implementations
Trait Implementations
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for BinOp
impl UnwindSafe for BinOp
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous). Read more
This method tries to recover the query key from the given DepNode,
something which is needed when forcing DepNodes during red-green
evaluation. The query system will only call this method if
fingerprint_style() is not FingerprintStyle::Opaque.
It is always valid to return None here, in which case incremental
compilation will treat the query as having changed instead of forcing it. 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 bytesSub: 0 bytesMul: 0 bytesDiv: 0 bytesRem: 0 bytesBitXor: 0 bytesBitAnd: 0 bytesBitOr: 0 bytesShl: 0 bytesShr: 0 bytesEq: 0 bytesLt: 0 bytesLe: 0 bytesNe: 0 bytesGe: 0 bytesGt: 0 bytesOffset: 0 bytes