]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #82855 - jyn514:no-temporaries, r=GuillaumeGomez
authorbors <bors@rust-lang.org>
Mon, 22 Mar 2021 06:45:33 +0000 (06:45 +0000)
committerbors <bors@rust-lang.org>
Mon, 22 Mar 2021 06:45:33 +0000 (06:45 +0000)
commit2b8fbe6b0b6db7960828bd2c9a50e52c9a5d0aef
tree92d9b94cd437e9e7ca01080b10e87d0475444cfb
parent142c831861ba5a995fd9de99198e7f6074b6b400
parent1e6d8495ba63255407ebea058f2194b65ccc307d
Auto merge of #82855 - jyn514:no-temporaries, r=GuillaumeGomez

Avoid temporary allocations in `render_assoc_item`

`render_assoc_item` came up as very hot in a profile of rustdoc on
`bevy`.  This avoids some temporary allocations just to calculate the
length of the header.

This should be a strict improvement, since all string formatting was
done twice before.

cc #82845
src/librustdoc/html/render/mod.rs