Closed
Description
UPDATE: Mentoring instructions below.
We are not giving a very good error message in this example:
fn main() {
let mut dirty_list = (0..5).collect();
dirty_list.pop();
}
error[E0619]: the type of this value must be known in this context
--> src/main.rs:3:5
|
3 | dirty_list.pop();
| ^^^^^^^^^^^^^^^^
It'd be nice if we at least informed the user that they ought to annotate the type of dirty_list
. (Indeed, I know we used to have a bug on this, and I thought we were doing so...?)
It'd be nicer still if we recognized that there is a call to collect
and were able to say something like "you need to specify the kind of collection".
cc @estebank