-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
make alloc
and collections
compilable for thumbv6m-none-eabi
#37492
Conversation
by cfging away `alloc::Arc` and changing OOM to abort for this target
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
#[inline(never)] | ||
#[unstable(feature = "oom", reason = "not a scrutinized interface", | ||
issue = "27700")] | ||
pub fn oom() -> ! { |
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.
To help with the #[cfg]
amount in this module, perhaps this could have two mod imp
modules with the #[cfg]
attributes and the implementation is reexported?
cc @rust-lang/libs, perhaps more input for the scenario discussion |
+1 from me; our LLVM target (OR1K) did not have atomics nor our use case had any need for atomics. I have since partially implemented atomics, which was rather tricky due to issues with OR1K ISA, but should probably not have bothered, and this functionality would have been welcome. |
@japaric looks like not too many other opinions from @rust-lang/libs so let's move forward with this, want to update the |
I'd like more time to think about this. There are a lot of pieces of std that people want to start slicing out but so far there are very few places where we use |
Done. |
@brson ah yeah sure. To clarify my thinking, it's always been my impression that std gives you everything it can when compiled for any particular platform. That is, it just doesn't compile in anything it can't support. The usage of scenarios eventually would then provide nice gated access to all APIs and a principled way to work with the standard library. |
r? @brson |
I want to note that:
|
@brson ping! Saw my last comment? ^ |
@bors r+ |
📌 Commit abe6fc7 has been approved by |
make `alloc` and `collections` compilable for thumbv6m-none-eabi by cfging away `alloc::Arc` and changing OOM to abort for this target r? @alexcrichton cc @thejpster
by cfging away
alloc::Arc
and changing OOM to abort for this targetr? @alexcrichton
cc @thejpster