#[non_exhaustive]pub enum OpClass {
Int(Prim),
Float(Prim),
Bool,
Char,
Str,
NullCheck,
Dynamic,
}Expand description
How an OPS operation was resolved by its operand types (HIR leaves this
open: the same add is integer, IEEE, or string concatenation).
§Examples
use hir_lang::Prim;
use typeck_lang::OpClass;
assert_ne!(OpClass::Int(Prim::I32), OpClass::Float(Prim::F64));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Int(Prim)
Integer semantics (OPS §3) on this type.
Float(Prim)
IEEE semantics (OPS §4) on this type.
Bool
Logical operations on bool.
Char
Comparisons of char.
Str
String comparison or concatenation (a runtime-library operation).
NullCheck
x == null / x != null.
Dynamic
Dispatched at run time on dynamic values.
Trait Implementations§
impl Copy for OpClass
impl Eq for OpClass
impl StructuralPartialEq for OpClass
Auto Trait Implementations§
impl Freeze for OpClass
impl RefUnwindSafe for OpClass
impl Send for OpClass
impl Sync for OpClass
impl Unpin for OpClass
impl UnsafeUnpin for OpClass
impl UnwindSafe for OpClass
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