Primitive types

See also: List of primitive types in the standard library documentation

Primitive types are types that are built into the language. All other types are composed of these primitive types.

Numeric types
Numeric types are integers (whole numbers) and floating-point numbers. Unsigned integers can never be negative. Signed integers can be negative and are represented as Two's complement.

The floating-point numbers implement the binary32 and binary64 formats specified in IEEE 754. This means that they are represented as a sign bit, an exponent and a fraction. They can be NaN ("not a number") and (–)Infinity. Because NaN is specified to not be equal to itself, floating-point numbers implement the trait, but not.

Never
The type, also called uninhabited type, indicated with an exclamation point. The never type can never exist at runtime, because no value of this type exists. It is the return type of functions that never return: Using  in other places than the return type of a function, is experimental and requires the   nightly feature. A workaround is to use an enum with no variants: The standard library contains a similar type,, which is used as the error type for conversions that never fail.

is a bottom type, which means that it is a subtype of every other type, and can be implicitly converted to any type. This is exploited when using or another panicking macro, which evaluates to  :   implements many traits from the standard library, to make it easier to use it in generic contexts.