module intrinsics

Expand

Compiler intrinsics – you really shouldn’t touch this, unless some intrinsic is exported to somewhere else.

Functions§

abort

Traps the processor, or, if no such instruction exists, aborts the process.

breakpoint

Triggers a breakpoint

call_main

Calls the main function, if it exists

count_ones
get_metadata

Gets the metadata of the reference. This is the vtable pointer for &dyn _, or the array length for &[_]. Returns 0 for all sized types.

leading_zeros
return_address

Returns the return address of the current function, or one of it’s callers, depending on if it was inlined or not.

reverse_bits
rotate_left
rotate_right
shuffle_left
shuffle_right
size_of

Returns the size of the type T

size_of_val

Gets the size of the value of type T at the pointer. This takes into account number of elements for &[_] or the size of the underlying type for &dyn _.

swap_bytes
trailing_zeros
type_name

Returns the typename of the type T

unreachable

Marks an unreachable branch. Triggers UB when reached.

volatile_read

Dereferences ptr in a volatile way. This causes the compiler to not reorder or remove reads.

volatile_write

Stores v in ptr in a volatile way. This causes the compiler to not reorder or remove writes.