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

Support arbitrary self types #19

Open
tmandry opened this issue Oct 11, 2024 · 0 comments
Open

Support arbitrary self types #19

tmandry opened this issue Oct 11, 2024 · 0 comments

Comments

@tmandry
Copy link
Collaborator

tmandry commented Oct 11, 2024

Support self types like &Box<Self> and Arc<Self>, and Pin<Box<Self>>.

These shouldn't actually be "arbitrary" because we need to know that we can coerce their inner types to dyn.. the same requirements that would need to be verified for rust-lang/rfcs#3621 (#[derive(CoercePointee)] as it's now being called). For self types involving Pin, we would also need to know the PinCoerceUnsized trait detailed in that RFC is implemented. All of this is unstable for now, so we can support it in a later PR.

For now, we can just allowlist specific pointer types from the standard library.

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

1 participant