The name "pop" was critized in the discussion thread but despite agreement
it should be changed, no one did. This commit implements basically the
suggestion by Amanieu (but `remove_current` instead of `remove`). There is
some discussion however, over if there should be two methods (differing in
what element is the current one after deletion). This should be discussed
in the tracking issue before stabilizing the feature.
This RFC isn't fully implemented, but tracking bug is closed.
This PR adds a tracking bug I found for part of the RFC that is not implemented.
There may be other open tracking bugs. This PR is intended to be an improvement,
may not be a complete fix for issue: https://github.com/rust-lang/rust/issues/66909
Suggest to fix a few errors/typos:
1. Erronously named type ```R``` renamed to ```Rhs```
2. Name some anonymous parameters (as later they are deprecated by RFC#1685)
The panic macro currently does not perform string formatting if
it only passed a single argument which is a string literal.
To be consistent with implicit named arguments and e.g.
`print!("{foo}")`, panic with a single string literal will need
to change to also use string formatting.
When format_args! recieves an expression as the first argument, it
attempts to expand it to a string literal. If successful, this is
used as the format string and format_args! macro expansion continues
as usual.
This has subtle interactions with macro hygiene when implicit named
arguments come into play. This commit adds dicussion around this case.
In RFC discussion it emerged that it was not clearly stated in the RFC
that implicit named arguments only apply if a corresponding explicit
named argument is not passed to the macro invocation.
Some discussion in the RFC about how `dotted.paths` might be
supported, especially in formatting parameters, came to the
conclusion that a new syntax would very likely be desirable. This
is added to the future work section and nominally suggests the
{(expr)} interpolation syntax to achieve this.
The RFC itself is not intended to be a way to sneak interpolation
into the formatting macros; the RFC author believes that they do
not need full interpolation support, although would not rule it
out if it was deemed desirable.
This update to the RFC text clarifies the distinction between
implicit named arguments and interpolation. It also adds a note
on prior art that Field Init Shorthand is an existing precedent
where language ergonomics have introduced a special case for
single identifiers.