Skip to content

Unsafe, optimization-oriented traits for precise sizes, orderings, and so forth #1051

@nikomatsakis

Description

@nikomatsakis

We could sometimes write faster routines (e.g. sort, etc) if they can rely on orderings being sane, iterators having correct lengths. But this makes implementing that ordering/iterator code unsafe. Currently the traits do not require unsafe code.

This issue is a request to extend the set of traits with unsafe variants that let users opt in to these faster implementations. These traits might be generated by derive etc.

RFCs and issues along these lines:

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.T-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions