-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.