Change fmt! to format!
Substitute type params in default type params using them.
auto merge of #11988 : cmr/rust/11668-squash, r=alexcrichton
auto merge of #11982 : eddyb/rust/generic-default-type-params, r=pcwalton

Fixes #11964 and closes #8998.