[][src]Module core::intrinsics

🔬 This is a nightly-only experimental API. (core_intrinsics #0)

intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library

Compiler intrinsics.

The corresponding definitions are in librustc_codegen_llvm/intrinsic.rs.

Volatiles

The volatile intrinsics provide operations intended to act on I/O memory, which are guaranteed to not be reordered by the compiler across other volatile intrinsics. See the LLVM documentation on [volatile].

Atomics

The atomic intrinsics provide common atomic operations on machine words, with multiple possible memory orderings. They obey the same semantics as C++11. See the LLVM documentation on [atomics].

A quick refresher on memory ordering:

Re-exports

pub use crate::ptr::drop_in_place;

Functions

copy

Copies count * size_of::<T>() bytes from src to dst. The source and destination may overlap.

copy_nonoverlapping

Copies count * size_of::<T>() bytes from src to dst. The source and destination must not overlap.

transmute

Reinterprets the bits of a value of one type as another type.

write_bytes

Sets count * size_of::<T>() bytes of memory starting at dst to val.

abortExperimental

Aborts the execution of the process.

add_with_overflowExperimental

Performs checked integer addition. The stabilized versions of this intrinsic are available on the integer primitives via the overflowing_add method. For example, std::u32::overflowing_add

arith_offsetExperimental

Calculates the offset from a pointer, potentially wrapping.

assumeExperimental

Informs the optimizer that a condition is always true. If the condition is false, the behavior is undefined.

atomic_andExperimental

Bitwise and with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_and method by passing Ordering::SeqCst as the order. For example, AtomicBool::fetch_and.

atomic_and_acqExperimental

Bitwise and with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_and method by passing Ordering::Acquire as the order. For example, AtomicBool::fetch_and.

atomic_and_acqrelExperimental

Bitwise and with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_and method by passing Ordering::AcqRel as the order. For example, AtomicBool::fetch_and.

atomic_and_relExperimental

Bitwise and with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_and method by passing Ordering::Release as the order. For example, AtomicBool::fetch_and.

atomic_and_relaxedExperimental

Bitwise and with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_and method by passing Ordering::Relaxed as the order. For example, AtomicBool::fetch_and.

atomic_cxchgExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::SeqCst as both the success and failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_acqExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::Acquire as both the success and failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_acq_failrelaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::Acquire as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_acqrelExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::AcqRel as the success and Ordering::Acquire as the failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_acqrel_failrelaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::AcqRel as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_failacqExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::SeqCst as the success and Ordering::Acquire as the failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_failrelaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::SeqCst as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_relExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::Release as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchg_relaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange method by passing Ordering::Relaxed as both the success and failure parameters. For example, AtomicBool::compare_exchange.

atomic_cxchgweakExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::SeqCst as both the success and failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_acqExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::Acquire as both the success and failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_acq_failrelaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::Acquire as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_acqrelExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::AcqRel as the success and Ordering::Acquire as the failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_acqrel_failrelaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::AcqRel as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_failacqExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::SeqCst as the success and Ordering::Acquire as the failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_failrelaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::SeqCst as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_relExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::Release as the success and Ordering::Relaxed as the failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_cxchgweak_relaxedExperimental

Stores a value if the current value is the same as the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the compare_exchange_weak method by passing Ordering::Relaxed as both the success and failure parameters. For example, AtomicBool::compare_exchange_weak.

atomic_fenceExperimental
atomic_fence_acqExperimental
atomic_fence_acqrelExperimental
atomic_fence_relExperimental
atomic_loadExperimental

Loads the current value of the pointer. The stabilized version of this intrinsic is available on the std::sync::atomic types via the load method by passing Ordering::SeqCst as the order. For example, AtomicBool::load.

atomic_load_acqExperimental

Loads the current value of the pointer. The stabilized version of this intrinsic is available on the std::sync::atomic types via the load method by passing Ordering::Acquire as the order. For example, AtomicBool::load.

atomic_load_relaxedExperimental

Loads the current value of the pointer. The stabilized version of this intrinsic is available on the std::sync::atomic types via the load method by passing Ordering::Relaxed as the order. For example, AtomicBool::load.

atomic_load_unorderedExperimental
atomic_maxExperimental
atomic_max_acqExperimental
atomic_max_acqrelExperimental
atomic_max_relExperimental
atomic_max_relaxedExperimental
atomic_minExperimental
atomic_min_acqExperimental
atomic_min_acqrelExperimental
atomic_min_relExperimental
atomic_min_relaxedExperimental
atomic_nandExperimental

Bitwise nand with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic::AtomicBool type via the fetch_nand method by passing Ordering::SeqCst as the order. For example, AtomicBool::fetch_nand.

atomic_nand_acqExperimental

Bitwise nand with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic::AtomicBool type via the fetch_nand method by passing Ordering::Acquire as the order. For example, AtomicBool::fetch_nand.

atomic_nand_acqrelExperimental

Bitwise nand with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic::AtomicBool type via the fetch_nand method by passing Ordering::AcqRel as the order. For example, AtomicBool::fetch_nand.

atomic_nand_relExperimental

Bitwise nand with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic::AtomicBool type via the fetch_nand method by passing Ordering::Release as the order. For example, AtomicBool::fetch_nand.

atomic_nand_relaxedExperimental

Bitwise nand with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic::AtomicBool type via the fetch_nand method by passing Ordering::Relaxed as the order. For example, AtomicBool::fetch_nand.

atomic_orExperimental

Bitwise or with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_or method by passing Ordering::SeqCst as the order. For example, AtomicBool::fetch_or.

atomic_or_acqExperimental

Bitwise or with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_or method by passing Ordering::Acquire as the order. For example, AtomicBool::fetch_or.

atomic_or_acqrelExperimental

Bitwise or with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_or method by passing Ordering::AcqRel as the order. For example, AtomicBool::fetch_or.

atomic_or_relExperimental

Bitwise or with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_or method by passing Ordering::Release as the order. For example, AtomicBool::fetch_or.

atomic_or_relaxedExperimental

Bitwise or with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_or method by passing Ordering::Relaxed as the order. For example, AtomicBool::fetch_or.

atomic_singlethreadfenceExperimental

A compiler-only memory barrier.

atomic_singlethreadfence_acqExperimental
atomic_singlethreadfence_acqrelExperimental
atomic_singlethreadfence_relExperimental
atomic_storeExperimental

Stores the value at the specified memory location. The stabilized version of this intrinsic is available on the std::sync::atomic types via the store method by passing Ordering::SeqCst as the order. For example, AtomicBool::store.

atomic_store_relExperimental

Stores the value at the specified memory location. The stabilized version of this intrinsic is available on the std::sync::atomic types via the store method by passing Ordering::Release as the order. For example, AtomicBool::store.

atomic_store_relaxedExperimental

Stores the value at the specified memory location. The stabilized version of this intrinsic is available on the std::sync::atomic types via the store method by passing Ordering::Relaxed as the order. For example, AtomicBool::store.

atomic_store_unorderedExperimental
atomic_umaxExperimental
atomic_umax_acqExperimental
atomic_umax_acqrelExperimental
atomic_umax_relExperimental
atomic_umax_relaxedExperimental
atomic_uminExperimental
atomic_umin_acqExperimental
atomic_umin_acqrelExperimental
atomic_umin_relExperimental
atomic_umin_relaxedExperimental
atomic_xaddExperimental

Adds to the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_add method by passing Ordering::SeqCst as the order. For example, AtomicIsize::fetch_add.

atomic_xadd_acqExperimental

Adds to the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_add method by passing Ordering::Acquire as the order. For example, AtomicIsize::fetch_add.

atomic_xadd_acqrelExperimental

Adds to the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_add method by passing Ordering::AcqRel as the order. For example, AtomicIsize::fetch_add.

atomic_xadd_relExperimental

Adds to the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_add method by passing Ordering::Release as the order. For example, AtomicIsize::fetch_add.

atomic_xadd_relaxedExperimental

Adds to the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_add method by passing Ordering::Relaxed as the order. For example, AtomicIsize::fetch_add.

atomic_xchgExperimental

Stores the value at the specified memory location, returning the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the swap method by passing Ordering::SeqCst as the order. For example, AtomicBool::swap.

atomic_xchg_acqExperimental

Stores the value at the specified memory location, returning the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the swap method by passing Ordering::Acquire as the order. For example, AtomicBool::swap.

atomic_xchg_acqrelExperimental

Stores the value at the specified memory location, returning the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the swap method by passing Ordering::AcqRel as the order. For example, AtomicBool::swap.

atomic_xchg_relExperimental

Stores the value at the specified memory location, returning the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the swap method by passing Ordering::Release as the order. For example, AtomicBool::swap.

atomic_xchg_relaxedExperimental

Stores the value at the specified memory location, returning the old value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the swap method by passing Ordering::Relaxed as the order. For example, AtomicBool::swap.

atomic_xorExperimental

Bitwise xor with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_xor method by passing Ordering::SeqCst as the order. For example, AtomicBool::fetch_xor.

atomic_xor_acqExperimental

Bitwise xor with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_xor method by passing Ordering::Acquire as the order. For example, AtomicBool::fetch_xor.

atomic_xor_acqrelExperimental

Bitwise xor with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_xor method by passing Ordering::AcqRel as the order. For example, AtomicBool::fetch_xor.

atomic_xor_relExperimental

Bitwise xor with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_xor method by passing Ordering::Release as the order. For example, AtomicBool::fetch_xor.

atomic_xor_relaxedExperimental

Bitwise xor with the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_xor method by passing Ordering::Relaxed as the order. For example, AtomicBool::fetch_xor.

atomic_xsubExperimental

Subtract from the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_sub method by passing Ordering::SeqCst as the order. For example, AtomicIsize::fetch_sub.

atomic_xsub_acqExperimental

Subtract from the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_sub method by passing Ordering::Acquire as the order. For example, AtomicIsize::fetch_sub.

atomic_xsub_acqrelExperimental

Subtract from the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_sub method by passing Ordering::AcqRel as the order. For example, AtomicIsize::fetch_sub.

atomic_xsub_relExperimental

Subtract from the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_sub method by passing Ordering::Release as the order. For example, AtomicIsize::fetch_sub.

atomic_xsub_relaxedExperimental

Subtract from the current value, returning the previous value. The stabilized version of this intrinsic is available on the std::sync::atomic types via the fetch_sub method by passing Ordering::Relaxed as the order. For example, AtomicIsize::fetch_sub.

bitreverseExperimental

Reverses the bits in an integer type T.

breakpointExperimental

Executes a breakpoint trap, for inspection by a debugger.

bswapExperimental

Reverses the bytes in an integer type T.

ceilf32Experimental

Returns the smallest integer greater than or equal to an f32.

ceilf64Experimental

Returns the smallest integer greater than or equal to an f64.

copysignf32Experimental

Copies the sign from y to x for f32 values.

copysignf64Experimental

Copies the sign from y to x for f64 values.

cosf32Experimental

Returns the cosine of an f32.

cosf64Experimental

Returns the cosine of an f64.

ctlzExperimental

Returns the number of leading unset bits (zeroes) in an integer type T.

ctlz_nonzeroExperimental

Like ctlz, but extra-unsafe as it returns undef when given an x with value 0.

ctpopExperimental

Returns the number of bits set in an integer type T

cttzExperimental

Returns the number of trailing unset bits (zeroes) in an integer type T.

cttz_nonzeroExperimental

Like cttz, but extra-unsafe as it returns undef when given an x with value 0.

discriminant_valueExperimental

Returns the value of the discriminant for the variant in 'v', cast to a u64; if T has no discriminant, returns 0.

exact_divExperimental

Performs an exact division, resulting in undefined behavior where x % y != 0 or y == 0 or x == T::min_value() && y == -1

exp2f32Experimental

Returns 2 raised to the power of an f32.

exp2f64Experimental

Returns 2 raised to the power of an f64.

expf32Experimental

Returns the exponential of an f32.

expf64Experimental

Returns the exponential of an f64.

fabsf32Experimental

Returns the absolute value of an f32.

fabsf64Experimental

Returns the absolute value of an f64.

fadd_fastExperimental

Float addition that allows optimizations based on algebraic rules. May assume inputs are finite.

fdiv_fastExperimental

Float division that allows optimizations based on algebraic rules. May assume inputs are finite.

floorf32Experimental

Returns the largest integer less than or equal to an f32.

floorf64Experimental

Returns the largest integer less than or equal to an f64.

fmaf32Experimental

Returns a * b + c for f32 values.

fmaf64Experimental

Returns a * b + c for f64 values.

fmul_fastExperimental

Float multiplication that allows optimizations based on algebraic rules. May assume inputs are finite.

forgetExperimental

Moves a value out of scope without running drop glue.

frem_fastExperimental

Float remainder that allows optimizations based on algebraic rules. May assume inputs are finite.

fsub_fastExperimental

Float subtraction that allows optimizations based on algebraic rules. May assume inputs are finite.

initDeprecatedExperimental

Creates a value initialized to zero.

likelyExperimental

Hints to the compiler that branch condition is likely to be true. Returns the value passed to it.

log10f32Experimental

Returns the base 10 logarithm of an f32.

log10f64Experimental

Returns the base 10 logarithm of an f64.

log2f32Experimental

Returns the base 2 logarithm of an f32.

log2f64Experimental

Returns the base 2 logarithm of an f64.

logf32Experimental

Returns the natural logarithm of an f32.

logf64Experimental

Returns the natural logarithm of an f64.

maxnumf32Experimental

Returns the maximum of two f32 values.

maxnumf64Experimental

Returns the maximum of two f64 values.

min_align_ofExperimental
min_align_of_valExperimental
minnumf32Experimental

Returns the minimum of two f32 values.

minnumf64Experimental

Returns the minimum of two f64 values.

move_val_initExperimental

Moves a value to an uninitialized memory location.

mul_with_overflowExperimental

Performs checked integer multiplication The stabilized versions of this intrinsic are available on the integer primitives via the overflowing_mul method. For example, std::u32::overflowing_mul

nearbyintf32Experimental

Returns the nearest integer to an f32.

nearbyintf64Experimental

Returns the nearest integer to an f64.

needs_dropExperimental

Returns true if the actual type given as T requires drop glue; returns false if the actual type provided for T implements Copy.

nontemporal_storeExperimental

Emits a !nontemporal store according to LLVM (see their docs). Probably will never become stable.

offsetExperimental

Calculates the offset from a pointer.

overflowing_addExperimental

Returns (a + b) mod 2N, where N is the width of T in bits. The stabilized versions of this intrinsic are available on the integer primitives via the wrapping_add method. For example, std::u32::wrapping_add

overflowing_mulExperimental

Returns (a * b) mod 2N, where N is the width of T in bits. The stabilized versions of this intrinsic are available on the integer primitives via the wrapping_mul method. For example, std::u32::wrapping_mul

overflowing_subExperimental

Returns (a - b) mod 2N, where N is the width of T in bits. The stabilized versions of this intrinsic are available on the integer primitives via the wrapping_sub method. For example, std::u32::wrapping_sub

panic_if_uninhabitedExperimental

A guard for unsafe functions that cannot ever be executed if T is uninhabited: This will statically either panic, or do nothing.

powf32Experimental

Raises an f32 to an f32 power.

powf64Experimental

Raises an f64 to an f64 power.

powif32Experimental

Raises an f32 to an integer power.

powif64Experimental

Raises an f64 to an integer power.

pref_align_ofExperimental
prefetch_read_dataExperimental

The prefetch intrinsic is a hint to the code generator to insert a prefetch instruction if supported; otherwise, it is a no-op. Prefetches have no effect on the behavior of the program but can change its performance characteristics.

prefetch_read_instructionExperimental

The prefetch intrinsic is a hint to the code generator to insert a prefetch instruction if supported; otherwise, it is a no-op. Prefetches have no effect on the behavior of the program but can change its performance characteristics.

prefetch_write_dataExperimental

The prefetch intrinsic is a hint to the code generator to insert a prefetch instruction if supported; otherwise, it is a no-op. Prefetches have no effect on the behavior of the program but can change its performance characteristics.

prefetch_write_instructionExperimental

The prefetch intrinsic is a hint to the code generator to insert a prefetch instruction if supported; otherwise, it is a no-op. Prefetches have no effect on the behavior of the program but can change its performance characteristics.

rintf32Experimental

Returns the nearest integer to an f32. May raise an inexact floating-point exception if the argument is not an integer.

rintf64Experimental

Returns the nearest integer to an f64. May raise an inexact floating-point exception if the argument is not an integer.

rotate_leftExperimental

Performs rotate left. The stabilized versions of this intrinsic are available on the integer primitives via the rotate_left method. For example, std::u32::rotate_left

rotate_rightExperimental

Performs rotate right. The stabilized versions of this intrinsic are available on the integer primitives via the rotate_right method. For example, std::u32::rotate_right

roundf32Experimental

Returns the nearest integer to an f32. Rounds half-way cases away from zero.

roundf64Experimental

Returns the nearest integer to an f64. Rounds half-way cases away from zero.

rustc_peekExperimental

Magic intrinsic that derives its meaning from attributes attached to the function.

saturating_addExperimental

Computes a + b, while saturating at numeric bounds. The stabilized versions of this intrinsic are available on the integer primitives via the saturating_add method. For example, std::u32::saturating_add

saturating_subExperimental

Computes a - b, while saturating at numeric bounds. The stabilized versions of this intrinsic are available on the integer primitives via the saturating_sub method. For example, std::u32::saturating_sub

sinf32Experimental

Returns the sine of an f32.

sinf64Experimental

Returns the sine of an f64.

size_ofExperimental

The size of a type in bytes.

size_of_valExperimental

The size of the referenced value in bytes.

sqrtf32Experimental

Returns the square root of an f32

sqrtf64Experimental

Returns the square root of an f64

sub_with_overflowExperimental

Performs checked integer subtraction The stabilized versions of this intrinsic are available on the integer primitives via the overflowing_sub method. For example, std::u32::overflowing_sub

truncf32Experimental

Returns the integer part of an f32.

truncf64Experimental

Returns the integer part of an f64.

tryExperimental

Rust's "try catch" construct which invokes the function pointer f with the data pointer data.

type_idExperimental

Gets an identifier which is globally unique to the specified type. This function will return the same value for a type regardless of whichever crate it is invoked in.

type_nameExperimental

Gets a static string slice containing the name of a type.

unaligned_volatile_loadExperimental

Performs a volatile load from the src pointer The pointer is not required to be aligned.

unaligned_volatile_storeExperimental

Performs a volatile store to the dst pointer. The pointer is not required to be aligned.

unchecked_addExperimental

Returns the result of an unchecked addition, resulting in undefined behavior when x + y > T::max_value() or x + y < T::min_value().

unchecked_divExperimental

Performs an unchecked division, resulting in undefined behavior where y = 0 or x = T::min_value() and y = -1

unchecked_mulExperimental

Returns the result of an unchecked multiplication, resulting in undefined behavior when x * y > T::max_value() or x * y < T::min_value().

unchecked_remExperimental

Returns the remainder of an unchecked division, resulting in undefined behavior where y = 0 or x = T::min_value() and y = -1

unchecked_shlExperimental

Performs an unchecked left shift, resulting in undefined behavior when y < 0 or y >= N, where N is the width of T in bits.

unchecked_shrExperimental

Performs an unchecked right shift, resulting in undefined behavior when y < 0 or y >= N, where N is the width of T in bits.

unchecked_subExperimental

Returns the result of an unchecked substraction, resulting in undefined behavior when x - y > T::max_value() or x - y < T::min_value().

unlikelyExperimental

Hints to the compiler that branch condition is likely to be false. Returns the value passed to it.

unreachableExperimental

Tells LLVM that this point in the code is not reachable, enabling further optimizations.

volatile_copy_memoryExperimental

Equivalent to the appropriate llvm.memmove.p0i8.0i8.* intrinsic, with a size of count * size_of::<T>() and an alignment of min_align_of::<T>()

volatile_copy_nonoverlapping_memoryExperimental

Equivalent to the appropriate llvm.memcpy.p0i8.0i8.* intrinsic, with a size of count * size_of::<T>() and an alignment of min_align_of::<T>()

volatile_loadExperimental

Performs a volatile load from the src pointer. The stabilized version of this intrinsic is std::ptr::read_volatile.

volatile_set_memoryExperimental

Equivalent to the appropriate llvm.memset.p0i8.* intrinsic, with a size of count * size_of::<T>() and an alignment of min_align_of::<T>().

volatile_storeExperimental

Performs a volatile store to the dst pointer. The stabilized version of this intrinsic is std::ptr::write_volatile.