Skip to content

More ergnomic stack_pin_init! API with super_let or pin_ergonomics #147

Description

@nbdd0121

Once we have either super_let or pin_ergonomics, we will be able to have APIs like this:

let foo = stack_init_pin!(bar);

instead of

stack_init_pin!(let foo = bar);

For super let, it's easy to implement, we just use super let to create the place.

For pin_ergonomics, we can implement a type that does initialization on deref_mut (which works with lifetime extension) and then use &pin mut *init_on_deref_mut to create the Pin<&mut T> that we want.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    trackingTracking issues that cannot be acted on immediately

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions