Process ffi generics in rustdoc

This prevents an assertion from being tripped because the generics weren't
categorized.

Closes #10597
auto merge of #10598 : alexcrichton/rust/rustdoc, r=thestinger

This prevents an assertion from being tripped because the generics weren't
categorized.

Closes #10597