diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-08-12 14:36:09 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-08-26 20:30:10 -0400 |
| commit | edfd5556f1ddc44a9cf5a53db417330661d47053 (patch) | |
| tree | 5e4bbcf6ac59c252937f2934918b5c9bd038988c /src/libstd/sys/unix/stack_overflow.rs | |
| parent | dafdfee33e8e78c3f34dd5befb3581fff0041ebd (diff) | |
| download | rust-edfd5556f1ddc44a9cf5a53db417330661d47053.tar.gz rust-edfd5556f1ddc44a9cf5a53db417330661d47053.zip | |
Transition a few fmt::Display impls to functions
This introduces a WithFormatter abstraction that permits one-time fmt::Display on an arbitrary closure, created via `display_fn`. This allows us to prevent allocation while still using functions instead of structs, which are a bit unwieldy to thread arguments through as they can't easily call each other (and are generally a bit opaque). The eventual goal here is likely to move us off of the formatting infrastructure entirely in favor of something more structured, but this is a good step to move us in that direction as it makes, for example, passing a context describing current state to the formatting impl much easier.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
