Skip to content

For position named arguments lint, underline both curly brackets when inserting and don't add $ to formatting names in messages #99907

Closed
@PrestonFrom

Description

@PrestonFrom

A comment asked why we only underline the closing curly brace when inserting (https://github.com/rust-lang/rust/pull/99660/files/1b2e05e212f9e2d50fb35817a80136018fbea4ba#r932952838) a named argument. This was originally because that's where it gets inserted -- but on reflection, this is potentially confusing. So underline both.

Also, in the lint message, the formatting argument names are emitted with a dollar sign.
this formatting argument uses named argument precision$ by position
This is also potentially confusing because the actual name does not contain it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions