Enum rustc_lint::middle::const_val::ConstVal
[−]
[src]
pub enum ConstVal {
Float(f64),
Integral(ConstInt),
Str(InternedString),
ByteStr(Rc<Vec<u8>>),
Bool(bool),
Struct(u32),
Tuple(u32),
Function(DefId),
Array(u32, u64),
Repeat(u32, u64),
Char(char),
Dummy,
}Unstable (
rustc_private)Variants
Float(f64)Unstable (
rustc_private)Integral(ConstInt)Unstable (
rustc_private)Str(InternedString)Unstable (
rustc_private)ByteStr(Rc<Vec<u8>>)Unstable (
rustc_private)Bool(bool)Unstable (
rustc_private)Struct(u32)Unstable (
rustc_private)Tuple(u32)Unstable (
rustc_private)Function(DefId)Unstable (
rustc_private)Array(u32, u64)Unstable (
rustc_private)Repeat(u32, u64)Unstable (
rustc_private)Char(char)Unstable (
rustc_private)DummyUnstable (
rustc_private)A value that only occurs in case eval_const_expr reported an error. You should never
handle this case. Its sole purpose is to allow more errors to be reported instead of
causing a fatal error.
Methods
impl ConstVal
fn description(&self) -> &'static str
Trait Implementations
impl Hash for ConstVal
impl PartialEq<ConstVal> for ConstVal
Note that equality for ConstVal means that the it is the same
constant, not that the rust values are equal. In particular, NaN == NaN (at least if it's the same NaN; distinct encodings for NaN
are considering unequal).
fn eq(&self, other: &ConstVal) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl Eq for ConstVal
Derived Implementations
impl Decodable for ConstVal
impl Encodable for ConstVal
impl Debug for ConstVal
impl Clone for ConstVal
fn clone(&self) -> ConstVal
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more