Uh oh!
There was an error while loading. Please reload this page.
Remove usable_size APIs - #69609
Conversation
Amanieu
left a comment
There was a problem hiding this comment.
The doc comments for the changed trait methods need to:
- Explain what the returned
usizeis and how it is different fromlayout.size(). - Say that simply returning
layout.size()is enough if your allocator doesn't support this.
There was a problem hiding this comment.
Why is this inline when none of the other functions are?
There was a problem hiding this comment.
Why is this inline when none of the other functions are?
There was a problem hiding this comment.
Both cases of #[inline] are no-ops and just return Err.
TimDiekmann
commented
Mar 1, 2020
I'll add those snippets to the docs. Thanks for reviewing! |
TimDiekmann
commented
Mar 2, 2020
@Amanieu Do you think this should be mentioned on every allocating method or gobally on the trait? |
Amanieu
commented
Mar 2, 2020
I think it should be on all methods. |
rust-highfive
commented
Mar 2, 2020
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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have applied your suggestions and squashed the commits. |
Amanieu
commented
Mar 2, 2020
@bors r+ rollup=always |
bors
commented
Mar 2, 2020
📌 Commit d8e3557 has been approved by |
Remove `usable_size` APIs This removes the usable size APIs: - remove `usable_size` (obv) - change return type of allocating methods to include the allocated size - remove `_excess` API r? @Amanieuclosesrust-lang/wg-allocators#17
Rollup of 9 pull requests Successful merges: - #69565 (miri engine: turn some debug_assert into assert) - #69609 (Remove `usable_size` APIs) - #69620 (doc(librustc_error_codes): add long error explanation for E0719) - #69626 (Toolstate: don't duplicate nightly tool list.) - #69628 (Fix a leak in `DiagnosticBuilder::into_diagnostic`.) - #69633 (Update my mailmap entry) - #69634 (clean up E0378 explanation) - #69637 (Don't convert Results to Options just for matching.) - #69641 (Update books) Failed merges: r? @ghost
Rollup of 9 pull requests Successful merges: - #69213 (Improve documentation on iterators length) - #69609 (Remove `usable_size` APIs) - #69619 (more cleanups) - #69620 (doc(librustc_error_codes): add long error explanation for E0719) - #69626 (Toolstate: don't duplicate nightly tool list.) - #69628 (Fix a leak in `DiagnosticBuilder::into_diagnostic`.) - #69633 (Update my mailmap entry) - #69634 (clean up E0378 explanation) - #69637 (Don't convert Results to Options just for matching.) Failed merges: r? @ghost
This removes the usable size APIs:
usable_size(obv)_excessAPIr? @Amanieu
closesrust-lang/wg-allocators#17