fn create_generic_args<'tcx>(
tcx: TyCtxt<'tcx>,
sig_id: DefId,
delegation_id: LocalDefId,
parent_args: &[GenericArg<'tcx>],
child_args: &[GenericArg<'tcx>],
) -> Vec<GenericArg<'tcx>>Expand description
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.
The order of produced list is important, it must be of this pattern:
[SELF | maybe self in the beginning]
[PARENT | args of delegation parent]
[SIG PARENT LIFETIMES] <- lifetimes_end_pos
[SIG LIFETIMES]
[SELF | maybe self after lifetimes, when we reuse trait fn in free context]
[SIG PARENT TYPES/CONSTS]
[SIG TYPES/CONSTS]