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

Use Option<NonNull<T>> instead of *const () to allow unsized thread locals #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HyeonuPark
Copy link

This change allows to put !Sized types like dyn Trait or [T] on scoped_thread_local!().

As a consequence it adds T: 'static bound which may considered as a breaking change. But it's not possible to construct non-'static thread local with current scope_thread_local!() interface so I believe it can't break any existing code.

Tested on Rust 1.59

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