Skip to main content

Module delegation

Module delegation 

Source
Expand description

Support inheriting generic parameters and predicates for function delegation.

For more information about delegation design, see the tracking issue #118212.

Structsยง

ParamIndexRemapper ๐Ÿ”’

Enumsยง

FnKind ๐Ÿ”’
InheritanceKind ๐Ÿ”’
Given the current context(caller and callee FnKind), it specifies the policy of predicates and generic parameters inheritance.
SelfPositionKind ๐Ÿ”’

Functionsยง

check_constraints ๐Ÿ”’
create_folder_and_args ๐Ÿ”’
create_generic_args ๐Ÿ”’
Creates generic arguments for further delegation signature and predicates instantiation. Arguments can be user-specified (in this case they are in parent_args and child_args) or propagated. User can specify either both parent_args and child_args, one of them or none, that is why we firstly create generic arguments from generic params and then adjust them with user-specified args.
create_mapping ๐Ÿ”’
Maps sig generics into generic args of delegation. Delegation generics has the following pattern:
create_self_position_kind ๐Ÿ”’
fn_kind ๐Ÿ”’
get_delegation_parent_args_count_without_self ๐Ÿ”’
get_delegation_self_ty ๐Ÿ”’
get_delegation_user_specified_args ๐Ÿ”’
get_parent_and_inheritance_kind ๐Ÿ”’
inherit_predicates_for_delegation_item ๐Ÿ”’
inherit_sig_for_delegation_item ๐Ÿ”’

Type Aliasesยง

RemapTable ๐Ÿ”’