-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement {Arc, Rc}::downcast
#1340
Comments
For those who don't want to dig through some source:
|
Could we do this generically (one impl, instead of one per smart pointer type) if we had HKT? (And if we don't?) |
Don't forget OIBITs... |
@seanmonstar Thanks for pointing that out. Do we need all combinatoric possibilities of |
I believe if proper trait object subtyping (or just coercions...?) was implemented, this would be a non-issue. |
The |
What do you think of simply implementing all combinations, instead of us guessing up front which ones are useful? That would be: |
This is implemented for both types, so I'm closing this. |
I think this is possible to do safely, as it is essentially the inverse operation of
CoerceUnsized
. See an example implementation at https://github.com/apasel422/ref_count/.The text was updated successfully, but these errors were encountered: