[][src]Struct rustc_ap_rustc_target::abi::Scalar

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

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

impl Scalar[src]

pub fn is_bool(&self) -> bool[src]

pub fn valid_range_exclusive<C: HasDataLayout>(&self, cx: &C) -> Range<u128>[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]

impl Debug for Scalar[src]

impl Eq for Scalar[src]

impl Hash for Scalar[src]

impl<__CTX> HashStable<__CTX> for Scalar where
    __CTX: HashStableContext
[src]

impl PartialEq<Scalar> for Scalar[src]

impl StructuralEq for Scalar[src]

impl StructuralPartialEq for Scalar[src]

Auto Trait Implementations

impl RefUnwindSafe for Scalar

impl Send for Scalar

impl Sync for Scalar

impl Unpin for Scalar

impl UnwindSafe for Scalar

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,