Closed
Description
Sample code:
fn main() {
// Error: you are missing an argument
println!("My name is {0}, {1} {0}", "Bond");
}
error message:
me, ~/workspace/rust/byexample.rs » rustc scratchpad.rs
scratchpad.rs:13:14: 13:39 error: invalid reference to argument `1` (there are 1 arguments)
scratchpad.rs:13 println!("My name is {0}, {1} {0}", "Bond");
^~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
This should say "there is 1 argument" instead.
originally reported here: http://www.reddit.com/r/rust/comments/2b0mw8/error_message_in_format_args/