Closed
Description
The following code:
fn main() {
let _ = format!("{_foo}", _foo = 6u);
}
(Playpen: http://is.gd/me8pNE)
Gives the error:
<anon>:2:21: 2:29 error: invalid format string: expected `'}'`, found `'_'`
<anon>:2 let _ = format!("{_foo}", _foo = 6u);
^~~~~~~~
error: aborting due to previous error
It is not too confusing in this short example, but in a longer string it is not obvious that named identifiers cannot start with an underscore.