Skip to main content

create_mapping

Function create_mapping 

Source
fn create_mapping<'tcx>(
    tcx: TyCtxt<'tcx>,
    sig_id: DefId,
    def_id: LocalDefId,
    args: &[GenericArg<'tcx>],
) -> FxHashMap<u32, u32>
Expand description

Maps sig generics into generic args of delegation. Delegation generics has the following pattern:

[SELF | maybe self in the beginning] [PARENT | args of delegation parent] [SIG PARENT LIFETIMES] [SIG LIFETIMES] [SELF | maybe self after lifetimes, when we reuse trait fn in free context] [SIG PARENT TYPES/CONSTS] [SIG TYPES/CONSTS]