trans::foreign: Simplify some code by using our builder impl
auto merge of #15412 : dotdash/rust/builder, r=alexcrichton