Closed
Description
When running the following (clearly broken) program, the compiler spits out a completely incorrect error message:
fn main() {
println!(format!("foo"))
}
Results:
<anon>:2:14: 2:20 error: macro undefined: 'format'
<anon>:2 println!(format!("foo"))
^~~~~~
<anon>:2:14: 2:28 error: format argument must be a string literal.
<anon>:2 println!(format!("foo"))
^~~~~~~~~~~~~~
error: aborting due to 2 previous errors
playpen: application terminated with error code 101
While the second is correct, the first is wrong, confusing and suggests that format! needs to be imported somehow.
Metadata
Metadata
Assignees
Labels
No labels