Struct rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags
source · [−]pub struct CodegenFnAttrFlags {
bits: u32,
}Fields
bits: u32Implementations
sourceimpl CodegenFnAttrFlags
impl CodegenFnAttrFlags
sourcepub const COLD: CodegenFnAttrFlags
pub const COLD: CodegenFnAttrFlags
#[cold]: a hint to LLVM that this function, when called, is never on
the hot path.
sourcepub const ALLOCATOR: CodegenFnAttrFlags
pub const ALLOCATOR: CodegenFnAttrFlags
#[rustc_allocator]: a hint to LLVM that the pointer returned from this
function is never null.
sourcepub const NEVER_UNWIND: CodegenFnAttrFlags
pub const NEVER_UNWIND: CodegenFnAttrFlags
An indicator that function will never unwind. Will become obsolete once C-unwind is fully stabilized.
sourcepub const NAKED: CodegenFnAttrFlags
pub const NAKED: CodegenFnAttrFlags
#[naked]: an indicator to LLVM that no function prologue/epilogue
should be generated.
sourcepub const NO_MANGLE: CodegenFnAttrFlags
pub const NO_MANGLE: CodegenFnAttrFlags
#[no_mangle]: an indicator that the function’s name should be the same
as its symbol.
sourcepub const RUSTC_STD_INTERNAL_SYMBOL: CodegenFnAttrFlags
pub const RUSTC_STD_INTERNAL_SYMBOL: CodegenFnAttrFlags
#[rustc_std_internal_symbol]: an indicator that this symbol is a
“weird symbol” for the standard library in that it has slightly
different linkage, visibility, and reachability rules.
sourcepub const THREAD_LOCAL: CodegenFnAttrFlags
pub const THREAD_LOCAL: CodegenFnAttrFlags
#[thread_local]: indicates a static is actually a thread local
piece of memory
sourcepub const USED: CodegenFnAttrFlags
pub const USED: CodegenFnAttrFlags
#[used]: indicates that LLVM can’t eliminate this function (but the
linker can!).
sourcepub const FFI_RETURNS_TWICE: CodegenFnAttrFlags
pub const FFI_RETURNS_TWICE: CodegenFnAttrFlags
#[ffi_returns_twice], indicates that an extern function can return
multiple times
sourcepub const TRACK_CALLER: CodegenFnAttrFlags
pub const TRACK_CALLER: CodegenFnAttrFlags
#[track_caller]: allow access to the caller location
sourcepub const FFI_PURE: CodegenFnAttrFlags
pub const FFI_PURE: CodegenFnAttrFlags
#[ffi_pure]: applies clang’s pure attribute to a foreign function
declaration.
sourcepub const FFI_CONST: CodegenFnAttrFlags
pub const FFI_CONST: CodegenFnAttrFlags
#[ffi_const]: applies clang’s const attribute to a foreign function
declaration.
sourcepub const CMSE_NONSECURE_ENTRY: CodegenFnAttrFlags
pub const CMSE_NONSECURE_ENTRY: CodegenFnAttrFlags
#[cmse_nonsecure_entry]: with a TrustZone-M extension, declare a function as an entry function from Non-Secure code.
sourcepub const NO_COVERAGE: CodegenFnAttrFlags
pub const NO_COVERAGE: CodegenFnAttrFlags
#[no_coverage]: indicates that the function should be ignored by
the MIR InstrumentCoverage pass and not added to the coverage map
during codegen.
sourcepub const fn empty() -> CodegenFnAttrFlags
pub const fn empty() -> CodegenFnAttrFlags
Returns an empty set of flags
sourcepub const fn all() -> CodegenFnAttrFlags
pub const fn all() -> CodegenFnAttrFlags
Returns the set containing all flags.
sourcepub fn from_bits(bits: u32) -> Option<CodegenFnAttrFlags>
pub fn from_bits(bits: u32) -> Option<CodegenFnAttrFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> CodegenFnAttrFlags
pub const fn from_bits_truncate(bits: u32) -> CodegenFnAttrFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> CodegenFnAttrFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> CodegenFnAttrFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: CodegenFnAttrFlags) -> bool
pub const fn intersects(&self, other: CodegenFnAttrFlags) -> bool
Returns true if there are flags common to both self and other.
sourcepub const fn contains(&self, other: CodegenFnAttrFlags) -> bool
pub const fn contains(&self, other: CodegenFnAttrFlags) -> bool
Returns true all of the flags in other are contained within self.
sourcepub fn insert(&mut self, other: CodegenFnAttrFlags)
pub fn insert(&mut self, other: CodegenFnAttrFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: CodegenFnAttrFlags)
pub fn remove(&mut self, other: CodegenFnAttrFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: CodegenFnAttrFlags)
pub fn toggle(&mut self, other: CodegenFnAttrFlags)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: CodegenFnAttrFlags, value: bool)
pub fn set(&mut self, other: CodegenFnAttrFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
sourceimpl Binary for CodegenFnAttrFlags
impl Binary for CodegenFnAttrFlags
sourceimpl BitAnd<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl BitAnd<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn bitand(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
fn bitand(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
Returns the intersection between the two sets of flags.
type Output = CodegenFnAttrFlags
type Output = CodegenFnAttrFlags
The resulting type after applying the & operator.
sourceimpl BitAndAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl BitAndAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn bitand_assign(&mut self, other: CodegenFnAttrFlags)
fn bitand_assign(&mut self, other: CodegenFnAttrFlags)
Disables all flags disabled in the set.
sourceimpl BitOr<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl BitOr<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn bitor(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
fn bitor(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
Returns the union of the two sets of flags.
type Output = CodegenFnAttrFlags
type Output = CodegenFnAttrFlags
The resulting type after applying the | operator.
sourceimpl BitOrAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl BitOrAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn bitor_assign(&mut self, other: CodegenFnAttrFlags)
fn bitor_assign(&mut self, other: CodegenFnAttrFlags)
Adds the set of flags.
sourceimpl BitXor<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl BitXor<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn bitxor(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
fn bitxor(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
Returns the left flags, but with all the right flags toggled.
type Output = CodegenFnAttrFlags
type Output = CodegenFnAttrFlags
The resulting type after applying the ^ operator.
sourceimpl BitXorAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl BitXorAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn bitxor_assign(&mut self, other: CodegenFnAttrFlags)
fn bitxor_assign(&mut self, other: CodegenFnAttrFlags)
Toggles the set of flags.
sourceimpl Clone for CodegenFnAttrFlags
impl Clone for CodegenFnAttrFlags
sourcefn clone(&self) -> CodegenFnAttrFlags
fn clone(&self) -> CodegenFnAttrFlags
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 Debug for CodegenFnAttrFlags
impl Debug for CodegenFnAttrFlags
sourceimpl<'tcx, __D: TyDecoder<'tcx>> Decodable<__D> for CodegenFnAttrFlags
impl<'tcx, __D: TyDecoder<'tcx>> Decodable<__D> for CodegenFnAttrFlags
sourceimpl<'tcx, __E: TyEncoder<'tcx>> Encodable<__E> for CodegenFnAttrFlags
impl<'tcx, __E: TyEncoder<'tcx>> Encodable<__E> for CodegenFnAttrFlags
sourceimpl Extend<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl Extend<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn extend<T: IntoIterator<Item = CodegenFnAttrFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = CodegenFnAttrFlags>>(&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<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl FromIterator<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn from_iter<T: IntoIterator<Item = CodegenFnAttrFlags>>(
iterator: T
) -> CodegenFnAttrFlags
fn from_iter<T: IntoIterator<Item = CodegenFnAttrFlags>>(
iterator: T
) -> CodegenFnAttrFlags
Creates a value from an iterator. Read more
sourceimpl Hash for CodegenFnAttrFlags
impl Hash for CodegenFnAttrFlags
sourceimpl<'__ctx> HashStable<StableHashingContext<'__ctx>> for CodegenFnAttrFlags
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for CodegenFnAttrFlags
fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
sourceimpl LowerHex for CodegenFnAttrFlags
impl LowerHex for CodegenFnAttrFlags
sourceimpl Not for CodegenFnAttrFlags
impl Not for CodegenFnAttrFlags
sourcefn not(self) -> CodegenFnAttrFlags
fn not(self) -> CodegenFnAttrFlags
Returns the complement of this set of flags.
type Output = CodegenFnAttrFlags
type Output = CodegenFnAttrFlags
The resulting type after applying the ! operator.
sourceimpl Octal for CodegenFnAttrFlags
impl Octal for CodegenFnAttrFlags
sourceimpl Ord for CodegenFnAttrFlags
impl Ord for CodegenFnAttrFlags
sourceimpl PartialEq<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl PartialEq<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn eq(&self, other: &CodegenFnAttrFlags) -> bool
fn eq(&self, other: &CodegenFnAttrFlags) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &CodegenFnAttrFlags) -> bool
fn ne(&self, other: &CodegenFnAttrFlags) -> bool
This method tests for !=.
sourceimpl PartialOrd<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl PartialOrd<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn partial_cmp(&self, other: &CodegenFnAttrFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &CodegenFnAttrFlags) -> 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 Sub<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl Sub<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn sub(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
fn sub(self, other: CodegenFnAttrFlags) -> CodegenFnAttrFlags
Returns the set difference of the two sets of flags.
type Output = CodegenFnAttrFlags
type Output = CodegenFnAttrFlags
The resulting type after applying the - operator.
sourceimpl SubAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
impl SubAssign<CodegenFnAttrFlags> for CodegenFnAttrFlags
sourcefn sub_assign(&mut self, other: CodegenFnAttrFlags)
fn sub_assign(&mut self, other: CodegenFnAttrFlags)
Disables all flags enabled in the set.
sourceimpl UpperHex for CodegenFnAttrFlags
impl UpperHex for CodegenFnAttrFlags
impl Copy for CodegenFnAttrFlags
impl Eq for CodegenFnAttrFlags
impl StructuralEq for CodegenFnAttrFlags
impl StructuralPartialEq for CodegenFnAttrFlags
Auto Trait Implementations
impl RefUnwindSafe for CodegenFnAttrFlags
impl Send for CodegenFnAttrFlags
impl Sync for CodegenFnAttrFlags
impl Unpin for CodegenFnAttrFlags
impl UnwindSafe for CodegenFnAttrFlags
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<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self
fn allocate_from_iter<'a>(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = Self>
) -> &'a mut [Self]ⓘ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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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,
pub default fn fingerprint_style() -> FingerprintStyle
sourcepub default fn to_fingerprint(&self, tcx: Ctxt) -> Fingerprint
pub 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
pub default fn to_debug_str(&self, Ctxt) -> String
sourcepub default fn recover(
Ctxt,
&DepNode<<Ctxt as DepContext>::DepKind>
) -> Option<T>
pub 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 DepNodes 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub 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: 4 bytes