Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document when and how to specialize for optimization #8

Open
m-ou-se opened this issue Jan 30, 2021 · 1 comment
Open

Document when and how to specialize for optimization #8

m-ou-se opened this issue Jan 30, 2021 · 1 comment

Comments

@m-ou-se
Copy link
Member

m-ou-se commented Jan 30, 2021

A lot of iterator adapters have specialized implementations for when the underlying iterator implements e.g. TrustedRandomAccess.Traits like that are marked with #[rustc_specialization_marker] or #[rustc_unsafe_specialization_marker]. We should document when to use this, and what it means for stability guarantees.

cc @matthewjasper

@KodrAus
Copy link
Contributor

KodrAus commented Jan 31, 2021

We've got a section here on specialization we can expand with #[rustc_specialization_marker] and whatnot: https://github.com/rust-lang/std-dev-guide/blob/master/src/code-considerations/using-unstable-lang/specialization.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants