Skip to content

Interesting format! specifiers are rejected #9669

Closed
@alexcrichton

Description

@alexcrichton

These combinations are all rejected, when some should probably be accepted.

format!("{1:#<0$s}", "", 10) // seems like a parser bug
format!("{:#<name$}", "", name=10) // seems like a nice parser feature

Accepting names of arguments for width/precision needs to make sure that it doesn't create ambiguities with the existing syntax.

Metadata

Metadata

Assignees

Labels

A-syntaxextArea: Syntax extensions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions