Struct rustc_middle::ty::ReprFlags
source · [−]pub struct ReprFlags {
bits: u8,
}
Fields
bits: u8
Implementations
sourceimpl ReprFlags
impl ReprFlags
pub const IS_C: ReprFlags = ReprFlags{bits: 1 << 0,}
pub const IS_SIMD: ReprFlags = ReprFlags{bits: 1 << 1,}
pub const IS_TRANSPARENT: ReprFlags = ReprFlags{bits: 1 << 2,}
pub const IS_LINEAR: ReprFlags = ReprFlags{bits: 1 << 3,}
pub const HIDE_NICHE: ReprFlags = ReprFlags{bits: 1 << 4,}
pub const RANDOMIZE_LAYOUT: ReprFlags = ReprFlags{bits: 1 << 5,}
pub const IS_UNOPTIMISABLE: ReprFlags = ReprFlags{bits: ReprFlags::IS_C.bits | ReprFlags::IS_SIMD.bits | ReprFlags::IS_LINEAR.bits,}
sourcepub fn from_bits(bits: u8) -> Option<ReprFlags>
pub fn from_bits(bits: u8) -> Option<ReprFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u8) -> ReprFlags
pub const fn from_bits_truncate(bits: u8) -> ReprFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u8) -> ReprFlags
pub const unsafe fn from_bits_unchecked(bits: u8) -> ReprFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: ReprFlags) -> bool
pub const fn intersects(&self, other: ReprFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Trait Implementations
sourceimpl BitAndAssign<ReprFlags> for ReprFlags
impl BitAndAssign<ReprFlags> for ReprFlags
sourcefn bitand_assign(&mut self, other: ReprFlags)
fn bitand_assign(&mut self, other: ReprFlags)
Disables all flags disabled in the set.
sourceimpl BitOrAssign<ReprFlags> for ReprFlags
impl BitOrAssign<ReprFlags> for ReprFlags
sourcefn bitor_assign(&mut self, other: ReprFlags)
fn bitor_assign(&mut self, other: ReprFlags)
Adds the set of flags.
sourceimpl BitXorAssign<ReprFlags> for ReprFlags
impl BitXorAssign<ReprFlags> for ReprFlags
sourcefn bitxor_assign(&mut self, other: ReprFlags)
fn bitxor_assign(&mut self, other: ReprFlags)
Toggles the set of flags.
sourceimpl Extend<ReprFlags> for ReprFlags
impl Extend<ReprFlags> for ReprFlags
sourcefn extend<T: IntoIterator<Item = ReprFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = ReprFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<ReprFlags> for ReprFlags
impl FromIterator<ReprFlags> for ReprFlags
sourceimpl<'__ctx> HashStable<StableHashingContext<'__ctx>> for ReprFlags
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for ReprFlags
fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
sourceimpl Ord for ReprFlags
impl Ord for ReprFlags
sourceimpl PartialOrd<ReprFlags> for ReprFlags
impl PartialOrd<ReprFlags> for ReprFlags
sourcefn partial_cmp(&self, other: &ReprFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &ReprFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl SubAssign<ReprFlags> for ReprFlags
impl SubAssign<ReprFlags> for ReprFlags
sourcefn sub_assign(&mut self, other: ReprFlags)
fn sub_assign(&mut self, other: ReprFlags)
Disables all flags enabled in the set.
impl Copy for ReprFlags
impl Eq for ReprFlags
impl StructuralEq for ReprFlags
impl StructuralPartialEq for ReprFlags
Auto Trait Implementations
impl RefUnwindSafe for ReprFlags
impl Send for ReprFlags
impl Sync for ReprFlags
impl Unpin for ReprFlags
impl UnwindSafe for ReprFlags
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> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. 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: 1 byte