Skip to content

identify traits in libstd that should use associated types (as output parameters) #17826

Closed
@pnkfelix

Description

@pnkfelix

as a subtask of #17307, once associated types are implemented, we will want to update libstd to use them, rather than continuing to use type parameters to traits as a way to encode so-called "output types" associated with an impl.

I ran the following ack invocation: ack --rust 'pub.*trait.*<' and then manually surveyed the results to determine the set of traits we might need to update. (I haven't finished the survey yet.)

Here is a google doc with partial results. There are at most 65 cases that I identified via this method, mostly in collections, core::iter, core::ops, and core::slice.

https://docs.google.com/spreadsheets/d/1Y_NAgzEK3FWcG0LjcykyKJEAibSFI3w-v-ekZ4GU8n4/edit?usp=sharing

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions