Closed
Description
The expression println!(format!("test"))
produces the following error:
<anon>:18:18: 18:24 error: macro undefined: 'format'
<anon>:18 println!(format!("test"))
^~~~~~
<anon>:18:18: 18:33 error: format argument must be a string literal.
<anon>:18 println!(format!("test"))
^~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
The macro undefined: 'format'
error is pretty misleading, implying that the user mispelled format!
or that it has a different name, but in reality it's just complaining because you're supposed to pass a literal to println!
. Why does this error get generated and is there a way to make it clearer?
Metadata
Metadata
Assignees
Labels
No labels