Skip to main content

Module generic_arg

Module generic_arg 

Source
Expand description

Things related to generic args in the next-trait-solver (GenericArg, GenericArgs, Term).

Implementations of GenericArg and Term are pointer-tagged instead of an enum (rustc does the same). This is done to save memory (which also helps speed) - one GenericArg is a machine word instead of two, while matching on it is basically as cheap. The implementation for both GenericArg and Term is shared in GenericArgImpl. This both simplifies the implementation, as well as enables a noop conversion from Term to GenericArg.

Structs§

GenericArg
GenericArgImpl 🔒
GenericArgs
GenericArgsStorage
StoredGenericArg
StoredGenericArgs
Term

Enums§

TermVid

Traits§

GenericArgsBuilder 🔒

Functions§

error_for_param_kind
mk_param

Type Aliases§

GenericArgKind
TermKind