Add initial support for a new formatting syntax #8182
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is the initial framework necessary for the advent of a new
string formatting system which will eventually replace
fmt!
. There's certainlya lot of stuff going on here, so here's a bit of a summary:
This entire implementation is based off of the discussions had on the mailing
lists at:
It should be noted that this is not ready to actually replace the
fmt!
macro.This request simply lays all of the groundwork to implement this new system.
The largest missing component is that all formatting specifiers are ignored.
Additionally, I'd like to take some time to bikeshed the format modifier syntax
after researching it a bit more.
Some notable points of the implementation
unsafe
Testing wise, I've included
Note that all of the code links will become stale as I rebase, but I don't
think that anything major will be changing at this point. The best examples can
be found in the run-pass test, although there's probably a number of cases that
I've missed!
I also realize that this is very large, although I couldn't figure out a really
good way of splitting it up. If there are suggestions of how to make this a bit
more manageable, than I'd definitely take the time to split things up.