Closed
Description
Actual behavior: When you compile this program,
fn main() {
println!("{:?}", (0..13).collect<Vec<i32>>());
}
this is the error message:
error: chained comparison operators require parentheses
--> collect_err.rs:2:37
|
2 | println!("{:?}", (0..13).collect<Vec<i32>>());
| ^^^^^^^^
Expected behavior: If you trigger this error in a slightly different way,
fn main() {
println!("{:?}", Vec<i32>::new());
}
you get a lovely "help" message at the end:
error: chained comparison operators require parentheses
--> collect_err.rs:2:25
|
2 | println!("{:?}", Vec<i32>::new());
| ^^^^^^^
|
= help: use `::<...>` instead of `<...>` if you meant to specify type arguments
The bug is that the first program does not trigger this help message.