1
Fork 0

Auto merge of #105363 - WaffleLapkin:thin2win_box_next_argument, r=nnethercote

Shrink `rustc_parse_format::Piece`

This makes both variants closer together in size (previously they were different by 208 bytes -- 16 vs 224). This may make things worse, but it's worth a try.

r? `@nnethercote`
This commit is contained in:
bors 2022-12-09 21:27:35 +00:00
commit 0d5573e6da
5 changed files with 50 additions and 44 deletions

View file

@ -333,7 +333,7 @@ pub fn make_format_args(
parse::Piece::String(s) => {
unfinished_literal.push_str(s);
}
parse::Piece::NextArgument(parse::Argument { position, position_span, format }) => {
parse::Piece::NextArgument(box parse::Argument { position, position_span, format }) => {
if !unfinished_literal.is_empty() {
template.push(FormatArgsPiece::Literal(Symbol::intern(&unfinished_literal)));
unfinished_literal.clear();