Solving combinatorial explosion when monomorphing


#1

Hi there

I am trying to find the cause for having around 1k instances of some function in my binary.
More specifically:

$ nm ./my_binary | grep "_ZN54_\$LT\$I\$u20\$as\$u20\$core..iter..traits..IntoIterator\$GT\$9" | wc -l
1053

I suspect that some unfortunate combination of generics lead to that.
So the question - how can I track the cause of that? Are there any ways to “debug” generic monomorphizations?

I’ve also tried using objdump ./my_binary -d -S, but looks like no source code for those functions available (debug mode is on and other function have source files annotations)