Struct rustc_target::abi::Scalar [−][src]
pub struct Scalar {
pub value: Primitive,
pub valid_range: RangeInclusive<u128>,
}Expand description
Information about one scalar component of a Rust type.
Fields
value: Primitivevalid_range: RangeInclusive<u128>Inclusive wrap-around range of valid values, that is, if
start > end, it represents start..=MAX,
followed by 0..=end.
That is, for an i8 primitive, a range of 254..=2 means following
sequence:
254 (-2), 255 (-1), 0, 1, 2
This is intended specifically to mirror LLVM’s !range metadata,
semantics.
Implementations
Returns the valid range as a x..y range.
If x and y are equal, the range is full, not empty.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Scalarimpl UnwindSafe for ScalarBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes