rust/library/core
Daniel Henry-Mantilla 94f7a7931c [doc] poll_fn: explain how to pin captured state safely
Usage of `Pin::new_unchecked(&mut …)` is dangerous with `poll_fn`, even
though the `!Unpin`-infectiousness has made things smoother.
Nonetheless, there are easy ways to avoid the need for any `unsafe`
altogether, be it through `Box::pin`ning, or the `pin!` macro. Since the
latter only works within an `async` context, showing an example
artifically introducing one ought to help people navigate this subtlety
with safety and confidence.
2023-06-18 09:56:13 +00:00
..
benches Add shortcut for Grisu3 algorithm. 2023-04-25 11:34:57 +08:00
primitive_docs
src [doc] poll_fn: explain how to pin captured state safely 2023-06-18 09:56:13 +00:00
tests Stabilize const_ptr_read 2023-05-05 20:36:21 +02:00
Cargo.toml Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00