rust/library/alloc
bors 4a8d2e3856 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
2022-05-30 17:39:58 +00:00
..
benches Avoid use of rand::thread_rng in stdlib benchmarks 2022-05-02 00:08:21 -07:00
src Auto merge of #97480 - conradludgate:faster-format-literals, r=joshtriplett 2022-05-30 17:39:58 +00:00
tests Use Box::new() instead of box syntax in alloc tests 2022-05-29 00:41:14 +02:00
Cargo.toml Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00