-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Remove helper-methods from Alloc trait and add associated Err type. #60771
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aidanhs (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. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ping from triage @aidanhs waiting for your review on this @lachlansneff you have failing tests to resolve. |
Ping from triage again! Same status as last time, I believe. @lachlansneff can you address the test failure? |
ping from triage |
I don’t believe there is consensus so far for adding this associated type. (Or that the Allocators WG really has a way to reach it at all, yet. See rust-lang/wg-allocators#20.) So implementing that change doesn’t seem appropriate to me at this time. As already argued in other threads, I personally don’t feel that having implementations of the As to a non-zero-size inhabited error type, as far as I know we have yet to see a concrete use case for an allocator implementation to provide more information about a failure. This feels like a theoretical exercise is making a maximally general API. Removing default methods on the other hand sounds fine to me. They would be easy to restore later if we decide to. |
thanks. marking this as "waiting on team" till there is some consensus on the associated type |
☔ The latest upstream changes (presumably #60340) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR removes the
alloc_one
,dealloc_one
,alloc_array
, anddealloc_array
methods from theAlloc
trait (as discussed in wg-allocators/#18) and adds an associatedErr
type (as discussed in wg-allocators/#23).The
CollectionAllocErr
enum is now generic onE
, the error type.