-
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 lintsE-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.
Description
Consider these comments by the one and only @steveklabnik:
[17:20:10] <steveklabnik> ugh
[17:20:19] <steveklabnik> so close to getting this to compile
[17:20:21] <steveklabnik> and i am rewarded with
[17:20:27] <steveklabnik> error: the trait `core::iter::FromIterator<core::result::Result<(collections::vec::Vec<usize>, collections::string::String), std::sync::mpsc::RecvError>>` is not implemented
for the type `collections::vec::Vec<(collections::vec::Vec<usize>, collections::string::String)>`
[17:20:31] <steveklabnik> O_O
[17:21:01] <steveklabnik> that one is easy i guess
[17:21:04] <steveklabnik> just a scary message
wouldn't it be nicer if the compiler saw that error involved FromIterator
and printed something like "the type you are iterating over doesn't match the expected type of the collection you are creating"?
Nominating for 1.0 (not beta), because this could be a big usability benefit. I'm sure there are other "well-known" traits we could do this for.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-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.