Skip to content
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

Move MaybeUninit static methods to inherent methods #123

Closed
SUPERCILEX opened this issue Oct 17, 2022 · 2 comments
Closed

Move MaybeUninit static methods to inherent methods #123

SUPERCILEX opened this issue Oct 17, 2022 · 2 comments
Labels
api-change-proposal A proposal to add or alter unstable APIs in the standard libraries T-libs-api

Comments

@SUPERCILEX
Copy link

SUPERCILEX commented Oct 17, 2022

Proposal

Problem statement

Based on this comment, the methods were added when making them inherent impls on arrays wasn't possible. This has presumably been fixed in the intervening years.

Motivation, use-cases

bar.foo() is easier to read than Namespace::foo(bar).

Solution sketches

@SUPERCILEX SUPERCILEX added api-change-proposal A proposal to add or alter unstable APIs in the standard libraries T-libs-api labels Oct 17, 2022
@scottmcm
Copy link
Member

nit: I think you mean "inherent" not "extension".

But because MaybeUninit isn't Deref, having these as inherent methods rather than associated functions (like they need to be on ManuallyDrop) sounds reasonable to me.

@SUPERCILEX SUPERCILEX changed the title Move MaybeUninit static methods to member/extension methods Move MaybeUninit static methods to inherent methods Oct 17, 2022
@SUPERCILEX
Copy link
Author

Yup, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change-proposal A proposal to add or alter unstable APIs in the standard libraries T-libs-api
Projects
None yet
Development

No branches or pull requests

2 participants