about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-30 17:39:58 +0000
committerbors <bors@rust-lang.org>2022-05-30 17:39:58 +0000
commit4a8d2e3856c0c75c71998b6c85937203839b946d (patch)
tree68c4e985080db02c2bfbe9e337fd37814ba94e8c /compiler/rustc_codegen_llvm/src
parente810f750a2a407f9caeabba39059578e844add14 (diff)
parent5dd0fe301ac0180afddc12ad3124ab0a1f813298 (diff)
downloadrust-4a8d2e3856c0c75c71998b6c85937203839b946d.tar.gz
rust-4a8d2e3856c0c75c71998b6c85937203839b946d.zip
Auto merge of #97480 - conradludgate:faster-format-literals, r=joshtriplett
improve format impl for literals

The basic idea of this change can be seen here https://godbolt.org/z/MT37cWoe1.

Updates the format impl to have a fast path for string literals and the default path for regular format args.

This change will allow `format!("string literal")` to be used interchangably with `"string literal".to_owned()`.

This would be relevant in the case of `f!"string literal"` being legal (https://github.com/rust-lang/rfcs/pull/3267) in which case it would be the easiest way to create owned strings from literals, while also being just as efficient as any other impl
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions