pub enum Const {
Int(i128),
Float(Float),
Address(Address),
}Expand description
The value of a constant expression, after folding.
Integers are held in a hundred and twenty eight bits whatever their type, which covers every
integer type this compiler has including __int128. A _BitInt(N) wider than that is not
representable here and is refused where it is written rather than silently truncated.
Variants§
Int(i128)
An integer, sign extended into the whole width from the type it has.
Float(Float)
A floating value, in the target’s format rather than the host’s.
Address(Address)
The address of an object, which is a number nobody knows until the link.
Trait Implementations§
impl Copy for Const
impl Eq for Const
impl StructuralPartialEq for Const
Auto Trait Implementations§
impl Freeze for Const
impl RefUnwindSafe for Const
impl Send for Const
impl Sync for Const
impl Unpin for Const
impl UnsafeUnpin for Const
impl UnwindSafe for Const
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