fn stable_order_of_exportable_impls<'tcx>(
tcx: TyCtxt<'tcx>,
_: LocalCrate,
) -> &'tcx FxIndexMap<DefId, usize>
Expand description
During symbol mangling rustc uses a special index to distinguish between two impls of
the same type in the same module(See DisambiguatedDefPathData
). For exportable items
we cannot use the current approach because it is dependent on the compiler’s
implementation.
In order to make disambiguation independent of the compiler version we can assign an id to each impl according to the relative order of elements in the source code.