Module util

Source
Expand description

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

Structsยง

AlwaysRequiresDrop
Discr
OpaqueTypeExpander ๐Ÿ”’
WeakAliasTypeExpander ๐Ÿ”’

Enumsยง

AsyncDropGlueMorphology
Indicates the form of AsyncDestruct::Destructor. Used to simplify async drop glue for types not using async drop.
CheckRegions
Used as an input to TyCtxt::uses_unique_generic_params.
ExplicitSelf
NotUniqueParam

Traitsยง

IntTypeExt

Functionsยง

fold_list
Does the equivalent of
intrinsic_raw
Determines whether an item is an intrinsic (which may be via Abi or via the rustc_intrinsic attribute).
is_doc_hidden ๐Ÿ”’
Determines whether an item is directly annotated with doc(hidden).
is_doc_notable_trait
Determines whether an item is annotated with doc(notable_trait).
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.
needs_drop_components_with_async
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.
provide
reveal_opaque_types_in_bounds
Reveals all opaque types in the given value, replacing them with their underlying types.