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
Compiling playground v0.0.1 (/playground)
error: invalid format string: expected `'}'` but string was terminated
--> src/main.rs:2:35
|
2 | println!("Hello, world! {0:}<3", 2);| - ^ expected `'}'`in format string
||| because of this opening brace
|
= note: if you intended to print `{`, you can escape it using `{{`
error: could not compile `playground` (bin "playground") due to previous error
Desired output
The error should mention that the closing curly brace `}` is interpreted as the fill character and suggest the removal of the colon to fix the issue.
Rationale and extra context
The format spec allows fill to be any character including }, this may be confusing.