pub enum OverflowOp {
Add,
Sub,
Mul,
}Expand description
Which arithmetic one of the overflow checking builtins does.
One node with an operation rather than three nodes, because everything around the arithmetic itself is the same for all three: the same rule picks the type it happens at, the same narrowing decides whether the answer fit, and the same store puts it where it was asked for.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for OverflowOp
impl Clone for OverflowOp
Source§fn clone(&self) -> OverflowOp
fn clone(&self) -> OverflowOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OverflowOp
Source§impl Debug for OverflowOp
impl Debug for OverflowOp
impl Eq for OverflowOp
Source§impl PartialEq for OverflowOp
impl PartialEq for OverflowOp
impl StructuralPartialEq for OverflowOp
Auto Trait Implementations§
impl Freeze for OverflowOp
impl RefUnwindSafe for OverflowOp
impl Send for OverflowOp
impl Sync for OverflowOp
impl Unpin for OverflowOp
impl UnsafeUnpin for OverflowOp
impl UnwindSafe for OverflowOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more