Skip to content

Commit d73e544

Browse files
Merge #203
203: expose std::pin r=yoshuawuyts a=yoshuawuyts This is important when defining / calling futures, so it makes sense for us to also export this. But also given recent user feedback on the confusion on pinning, I'd like to open up the possibility to experiment with providing better pinning facilities such as [`pin-project`](https://github.com/taiki-e/pin-project) or [`pin_mut`](https://docs.rs/pin-utils/0.1.0-alpha.4/pin_utils/macro.pin_mut.html) behind flags. I'm not sure if we could, or even should. But I want to allow us to have that conversation and test things out (even if it's just in floating patches.) Thanks! Co-authored-by: Yoshua Wuyts <[email protected]>
2 parents 265f1ff + 39a1c2b commit d73e544

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,8 @@ pub mod stream;
5252
pub mod sync;
5353
pub mod task;
5454

55+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
56+
#[cfg(feature = "unstable")]
57+
pub mod pin;
58+
5559
pub(crate) mod utils;

src/pin.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//! Types that pin data to its location in memory.
2+
//!
3+
//! For more documentation see [`std::pin`](https://doc.rust-lang.org/std/pin/index.html).
4+
5+
#[doc(inline)]
6+
pub use std::pin::Pin;

0 commit comments

Comments
 (0)