Expand description
Support inheriting generic parameters and predicates for function delegation.
For more information about delegation design, see the tracking issue #118212.
Structsยง
- Param
Index ๐Remapper
Enumsยง
- FnKind ๐
- Inheritance
Kind ๐ - Given the current context(caller and callee
FnKind), it specifies the policy of predicates and generic parameters inheritance. - Self
Position ๐Kind
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_argsandchild_args) or propagated. User can specify either bothparent_argsandchild_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ยง
- Remap
Table ๐