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

moving Pin API to a seperate module #53170

Closed
nivkner opened this issue Aug 7, 2018 · 3 comments
Closed

moving Pin API to a seperate module #53170

nivkner opened this issue Aug 7, 2018 · 3 comments

Comments

@nivkner
Copy link
Contributor

nivkner commented Aug 7, 2018

@withoutboats proposed in #49150 to move the Pin API to its own module in order to have a place to provide a high level overview for it.
I am making this a separate issue to discuss this particular aspect of the stabilization process, to not overload the tracking issue.

I found a problem with trying to move the API:
both the Option type and Future trait in core depend on PinMut directly so it can't just be moved from core, and PinBox requires allocation so it can't be in core.

should those types just be re-exportd from core and alloc into a module for the sake of unified documentation then? or is there some other way?

@cramertj
Copy link
Member

cramertj commented Aug 7, 2018

@nivkner It sounds like there's some confusion-- I think the discussion was about moving them into their own module (e.g. mod pin), not their own crate. They would still be defined in the core and alloc crates.

@withoutboats
Copy link
Contributor

withoutboats commented Aug 8, 2018

@nikver with the way core/std are currently set up, the way to do this is:

  1. Put PinMut in a module called pin in libcore.
  2. In libstd, create a pin module with PinBox and pub use core::pin::*; in it.

EDIT: Sorry I guess PinBox should be in alloc::pin.

@nivkner
Copy link
Contributor Author

nivkner commented Aug 9, 2018

implemented the change described here in #53227, so closing this, thanks.

@nivkner nivkner closed this as completed Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants