Struct rustc_target::abi::Scalar[][src]

pub struct Scalar {
    pub value: Primitive,
    pub valid_range: RangeInclusive<u128>,
}

Information about one scalar component of a Rust type.

Fields

Inclusive wrap-around range of valid values, that is, if start > end, it represents start..=max_value(), 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.

Methods

impl Scalar
[src]

Returns the valid range as a x..y range.

If x and y are equal, the range is full, not empty.

Trait Implementations

impl Clone for Scalar
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Scalar
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Scalar
[src]

impl Hash for Scalar
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Scalar
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Scalar

impl Sync for Scalar