Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add field accessing and indexing of arguments to format! #8614

Closed
tikue opened this issue Aug 19, 2013 · 6 comments
Closed

Add field accessing and indexing of arguments to format! #8614

tikue opened this issue Aug 19, 2013 · 6 comments
Labels
A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@tikue
Copy link
Contributor

tikue commented Aug 19, 2013

This would be nice if for no other reason than to reach feature parity with Python's str.format(), in which one can write things like:

>>> "{foo[0]} and {foo[1]} went up the hill".format(foo=['jack', 'jill']) 'jack and jill went up the hill'

@huonw
Copy link
Member

huonw commented Nov 16, 2013

Triage: working on this.

@huonw
Copy link
Member

huonw commented Nov 24, 2013

(This ended up being more subtle than I thought, and will likely take a bit of rearranging of the format!() code to do properly; I'm still working on it, but slowly, so if someone wants to take over, feel free to consult with me (or not, and just open a PR, that's OK too).)

@alexcrichton alexcrichton changed the title Add field accessing and indexing of arguments to ifmt! Add field accessing and indexing of arguments to format! Jun 9, 2014
@steveklabnik
Copy link
Member

Triage: nothing has changed here.

@steveklabnik
Copy link
Member

Triage: no change

@sfackler
Copy link
Member

Seems like this is something that should be over on rfcs?

@steveklabnik
Copy link
Member

Yeah, this would be a pretty big change, probably rfc-worthy.

flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 21, 2022
assertions_on_constants: ignore indirect `cfg!`

Fixes rust-lang#7597

changelog: [`assertions_on_constants`] ignore constants indirectly based on `cfg!`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

5 participants
@steveklabnik @huonw @sfackler @tikue and others