-
Notifications
You must be signed in to change notification settings - Fork 10
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
allow no-std but alloc #13
Conversation
As a side question: is it not sufficient to just |
The problem is that it would allow casting reference &T to &'static T |
The requirement is actually stronger than that. Downcasting requires knowing about the actual concrete type and not just the generic constraints. The constraint This extra-strict guarantee is how we ensure that it is safe to downcast a given type without knowing statically whether or not it is |
The macos CI failures are unrelated to your PR and were fixed in #15 if you want to pull the latest |
Oh, I wasn't aware |
The documentation will also need updated to reflect the new feature behaviors in the following places and probably clarify Lines 3 to 6 in 7512ea7
Lines 87 to 89 in 7512ea7
|
Alright, just added a little info about the new feature and fixed a broken link to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
There were a few types which implement
LifetimeFree
only instd
mode. This PR lowers the requirement by introducing a newalloc
feature that enables these traits inno-std
mode but whenalloc
is still available. These types includeString
,Box
,Vec
, andArc
, which has an additional (automatic) cfg due to only existing on platforms with ptr-sized atomics.