phobos
phobos copied to clipboard
Make allocate @safe
For allocators that implement their own allocate
method, this should be a pure nothrow @safe
function.
Allocators that are building on top of such allocators should infer the function attributes from their parents.
This PR is a subset of #5330, as this approach will provide us with better granularity. More smaller PRs to come :)
Thanks for your pull request, @edi33416! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Some tips to help speed things up:
-
smaller, focused PRs are easier to review than big ones
-
try not to mix up refactoring or style changes with bug fixes or feature enhancements
-
provide helpful commit messages explaining the rationale behind each change
Bear in mind that large or tricky changes may require multiple rounds of review and revision.
Please see CONTRIBUTING.md for more information.
Bugzilla references
Your PR doesn't reference any Bugzilla issue.
If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
@edi33416 I suggest for now let's leave AffixAllocator with an unsafe allocate.
@edi33416 I recommend splitting this PR up into smaller chunks, s.t. it can be reviewed and merged more quickly. As an additional benefit your chances of running into merge conflicts decrease too ;-)
Per the convo with @edi33416 today, please convert this diff to making allocate only nothrow
and (where applicable) @nogc
.
Ping @edi33416
@edi33416 Any chance of finishing this?