Skip to content

More ergnomic stack_pin_init! API with super_let or pin_ergonomics #147

@nbdd0121

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.

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