Enum rustc_trans::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, }
rustc_private
)Variants
Float(f64)
rustc_private
)Integral(ConstInt)
rustc_private
)Str(InternedString)
rustc_private
)ByteStr(Rc<Vec<u8>>)
rustc_private
)Bool(bool)
rustc_private
)Struct(u32)
rustc_private
)Tuple(u32)
rustc_private
)Function(DefId)
rustc_private
)Array(u32, u64)
rustc_private
)Repeat(u32, u64)
rustc_private
)Char(char)
rustc_private
)Dummy
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
fn hash<H>(&self, state: &mut H) where H: Hasher
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
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) -> bool
1.0.0
This method tests for !=
.
impl Eq for ConstVal
Derived Implementations
impl Decodable for ConstVal
impl Encodable for ConstVal
impl Debug for ConstVal
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
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