[−][src]Module rustc_middle::ty::util

Miscellaneous type-system utilities that are too small to deserve their own modules.

Structs

AlwaysRequiresDrop
Discr
OpaqueTypeExpander

Enums

ExplicitSelf
Representability

Describes whether a type is representable. For types that are not representable, 'SelfRecursive' and 'ContainsRecursive' are used to distinguish between types that are recursive with themselves and types that contain a different recursive type. These cases can therefore be treated differently when reporting errors.

Traits

IntTypeExt

Functions

fold_list
int_size_and_signed
needs_drop_components

Returns a list of types such that the given type needs drop if and only if any of the returned types need drop. Returns Err(AlwaysRequiresDrop) if this type always needs drop.

normalize_opaque_types

Normalizes all opaque types in the given value, replacing them with their underlying types.

provide
signed_max
signed_min
unsigned_max