Enum rustc_middle::mir::interpret::value::ScalarMaybeUninit
source · [−]Variants
Scalar(Scalar<Tag>)
Uninit
Implementations
sourceimpl<Tag> ScalarMaybeUninit<Tag>
impl<Tag> ScalarMaybeUninit<Tag>
pub fn from_pointer(ptr: Pointer<Tag>, cx: &impl HasDataLayout) -> Self
pub fn from_maybe_pointer(
ptr: Pointer<Option<Tag>>,
cx: &impl HasDataLayout
) -> Self
pub fn check_init<'tcx>(self) -> InterpResult<'tcx, Scalar<Tag>>
sourceimpl<'tcx, Tag: Provenance> ScalarMaybeUninit<Tag>
impl<'tcx, Tag: Provenance> ScalarMaybeUninit<Tag>
pub fn to_bool(self) -> InterpResult<'tcx, bool>
pub fn to_char(self) -> InterpResult<'tcx, char>
pub fn to_f32(self) -> InterpResult<'tcx, Single>
pub fn to_f64(self) -> InterpResult<'tcx, Double>
pub fn to_u8(self) -> InterpResult<'tcx, u8>
pub fn to_u16(self) -> InterpResult<'tcx, u16>
pub fn to_u32(self) -> InterpResult<'tcx, u32>
pub fn to_u64(self) -> InterpResult<'tcx, u64>
pub fn to_machine_usize(self, cx: &impl HasDataLayout) -> InterpResult<'tcx, u64>
pub fn to_i8(self) -> InterpResult<'tcx, i8>
pub fn to_i16(self) -> InterpResult<'tcx, i16>
pub fn to_i32(self) -> InterpResult<'tcx, i32>
pub fn to_i64(self) -> InterpResult<'tcx, i64>
pub fn to_machine_isize(self, cx: &impl HasDataLayout) -> InterpResult<'tcx, i64>
Trait Implementations
sourceimpl<Tag: Clone> Clone for ScalarMaybeUninit<Tag>
impl<Tag: Clone> Clone for ScalarMaybeUninit<Tag>
sourcefn clone(&self) -> ScalarMaybeUninit<Tag>
fn clone(&self) -> ScalarMaybeUninit<Tag>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<Tag: Provenance> Debug for ScalarMaybeUninit<Tag>
impl<Tag: Provenance> Debug for ScalarMaybeUninit<Tag>
sourceimpl<'tcx, Tag, __D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<__D> for ScalarMaybeUninit<Tag> where
Tag: Decodable<__D>,
impl<'tcx, Tag, __D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<__D> for ScalarMaybeUninit<Tag> where
Tag: Decodable<__D>,
sourceimpl<'tcx, Tag, __E: TyEncoder<I = TyCtxt<'tcx>>> Encodable<__E> for ScalarMaybeUninit<Tag> where
Tag: Encodable<__E>,
impl<'tcx, Tag, __E: TyEncoder<I = TyCtxt<'tcx>>> Encodable<__E> for ScalarMaybeUninit<Tag> where
Tag: Encodable<__E>,
sourceimpl<Tag> From<Scalar<Tag>> for ScalarMaybeUninit<Tag>
impl<Tag> From<Scalar<Tag>> for ScalarMaybeUninit<Tag>
sourceimpl<Tag: Hash> Hash for ScalarMaybeUninit<Tag>
impl<Tag: Hash> Hash for ScalarMaybeUninit<Tag>
sourceimpl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for ScalarMaybeUninit<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for ScalarMaybeUninit<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
sourceimpl<Tag: Provenance> LowerHex for ScalarMaybeUninit<Tag>
impl<Tag: Provenance> LowerHex for ScalarMaybeUninit<Tag>
sourceimpl<Tag: PartialEq> PartialEq<ScalarMaybeUninit<Tag>> for ScalarMaybeUninit<Tag>
impl<Tag: PartialEq> PartialEq<ScalarMaybeUninit<Tag>> for ScalarMaybeUninit<Tag>
sourcefn eq(&self, other: &ScalarMaybeUninit<Tag>) -> bool
fn eq(&self, other: &ScalarMaybeUninit<Tag>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ScalarMaybeUninit<Tag>) -> bool
fn ne(&self, other: &ScalarMaybeUninit<Tag>) -> bool
This method tests for !=
.
impl<Tag: Copy> Copy for ScalarMaybeUninit<Tag>
impl<Tag: Eq> Eq for ScalarMaybeUninit<Tag>
impl<Tag> StructuralEq for ScalarMaybeUninit<Tag>
impl<Tag> StructuralPartialEq for ScalarMaybeUninit<Tag>
Auto Trait Implementations
impl<Tag> RefUnwindSafe for ScalarMaybeUninit<Tag> where
Tag: RefUnwindSafe,
impl<Tag> Send for ScalarMaybeUninit<Tag> where
Tag: Send,
impl<Tag> Sync for ScalarMaybeUninit<Tag> where
Tag: Sync,
impl<Tag> Unpin for ScalarMaybeUninit<Tag> where
Tag: Unpin,
impl<Tag> UnwindSafe for ScalarMaybeUninit<Tag> where
Tag: UnwindSafe,
Blanket Implementations
sourceimpl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
fn allocate_on(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
default fn fingerprint_style() -> FingerprintStyle
sourcedefault fn to_fingerprint(&self, tcx: Ctxt) -> Fingerprint
default fn to_fingerprint(&self, tcx: Ctxt) -> Fingerprint
This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous). Read more
default fn to_debug_str(&self, Ctxt) -> String
sourcedefault fn recover(Ctxt, &DepNode<<Ctxt as DepContext>::DepKind>) -> Option<T>
default fn recover(Ctxt, &DepNode<<Ctxt as DepContext>::DepKind>) -> Option<T>
This method tries to recover the query key from the given DepNode
,
something which is needed when forcing DepNode
s during red-green
evaluation. The query system will only call this method if
fingerprint_style()
is not FingerprintStyle::Opaque
.
It is always valid to return None
here, in which case incremental
compilation will treat the query as having changed instead of forcing it. Read more
sourceimpl<T, R> InternIteratorElement<T, R> for T
impl<T, R> InternIteratorElement<T, R> for T
type Output = R
fn intern_with<I, F>(iter: I, f: F) -> <T as InternIteratorElement<T, R>>::Output where
I: Iterator<Item = T>,
F: FnOnce(&[T]) -> R,
sourceimpl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
impl<'a, T> Captures<'a> for T where
T: ?Sized,
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.