Sort trait bounds.

Closes #6334
auto merge of #15985 : jfager/rust/r6334, r=pnkfelix

 Closes #6334