You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
…-errors
Improve position named arguments lint underline and formatting names
For named arguments used as implicit position arguments, underline both
the opening curly brace and either:
* if there is formatting, the next character (which will either be the
closing curl brace or the `:` denoting the start of formatting args)
* if there is no formatting, the entire arg span (important if there is
whitespace like `{ }`)
This should make it more obvious where the named argument should be.
Additionally, in the lint message, emit the formatting argument names
without a dollar sign to avoid potentially confusion.
Fixesrust-lang#99907
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.
The text was updated successfully, but these errors were encountered: