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
Given a format string with an unclosed opening brace, the span points to the next element where a closing brace is expected. If this happens in a multiline format string, the span might be pointing to the line after the problem, with no secondary span referencing the opening brace. Either modify the error to be about "unclosed opening brace" pointing at the opening brace or add a secondary span pointing at it.
The text was updated successfully, but these errors were encountered:
estebank
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
A-diagnostics
Area: Messages for errors, warnings, and lints
and removed
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
labels
Aug 30, 2018
Various changes to string format diagnostics
- Point at opening mismatched formatting brace
- Account for differences between raw and regular strings
- Account for differences between the code snippet and `InternedString`
- Add more tests
```
error: invalid format string: expected `'}'`, found `'t'`
--> $DIR/ifmt-bad-arg.rs:85:1
|
LL | ninth number: {
| - because of this opening brace
LL | tenth number: {}",
| ^ expected `}` in format string
|
= note: if you intended to print `{`, you can escape it using `{{`
```
Fix#53837.
Given a format string with an unclosed opening brace, the span points to the next element where a closing brace is expected. If this happens in a multiline format string, the span might be pointing to the line after the problem, with no secondary span referencing the opening brace. Either modify the error to be about "unclosed opening brace" pointing at the opening brace or add a secondary span pointing at it.
Introduced in #52649. CC #53836.
The text was updated successfully, but these errors were encountered: