Struct rustc_ap_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: Primitive
valid_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 Scalar
impl UnwindSafe for Scalar
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V