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

Introduce reborrow to enable lifetime variance #32

Merged
merged 1 commit into from
May 27, 2024
Merged

Introduce reborrow to enable lifetime variance #32

merged 1 commit into from
May 27, 2024

Conversation

antiguru
Copy link
Owner

@antiguru antiguru commented May 27, 2024

Add Region::reborrow to shorten the lifetime of the read item to enable lifetime variance for users of the crate. This serves to overcome a limit where Rust does not infer appropriate lifetimes when unifying two different lifetimes.

cc @frankmcsherry

@antiguru antiguru merged commit 7676982 into main May 27, 2024
8 checks passed
@antiguru antiguru deleted the reborrow branch May 27, 2024 18:16
@github-actions github-actions bot mentioned this pull request May 27, 2024
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

Successfully merging this pull request may close these issues.

1 participant