Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6421a49

Browse files
committedFeb 15, 2022
Auto merge of rust-lang#93176 - danielhenrymantilla:stack-pinning-macro, r=m-ou-se
Add a stack-`pin!`-ning macro to `core::pin`. - rust-lang#93178 `pin!` allows pinning a value to the stack. Thanks to being implemented in the stdlib, which gives access to `macro` macros, and to the private `.pointer` field of the `Pin` wrapper, [it was recently discovered](https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async-foundations/topic/pin!.20.E2.80.94.20the.20.22definitive.22.20edition.20.28a.20rhs-compatible.20pin-nin.2E.2E.2E/near/268731241) ([archive link](https://zulip-archive.rust-lang.org/stream/187312-wg-async-foundations/topic/A.20rhs-compatible.20pin-ning.20macro.html#268731241)), contrary to popular belief, that it is actually possible to implement and feature such a macro: ```rust let foo: Pin<&mut PhantomPinned> = pin!(PhantomPinned); stuff(foo); ``` or, directly: ```rust stuff(pin!(PhantomPinned)); ``` - For context, historically, this used to require one of the two following syntaxes: - ```rust let foo = PhantomPinned; pin!(foo); stuff(foo); ``` - ```rust pin! { let foo = PhantomPinned; } stuff(foo); ``` This macro thus allows, for instance, doing things like: ```diff fn block_on<T>(fut: impl Future<Output = T>) -> T { // Pin the future so it can be polled. - let mut fut = Box::pin(fut); + let mut fut = pin!(fut); // Create a new context to be passed to the future. let t = thread::current(); let waker = Arc::new(ThreadWaker(t)).into(); let mut cx = Context::from_waker(&waker); // Run the future to completion. loop { match fut.as_mut().poll(&mut cx) { Poll::Ready(res) => return res, Poll::Pending => thread::park(), } } } ``` - _c.f._, https://doc.rust-lang.org/1.58.1/alloc/task/trait.Wake.html And so on, and so forth. I don't think such an API can get better than that, barring full featured language support (`&pin` references or something), so I see no reason not to start experimenting with featuring this in the stdlib already 🙂 - cc `@rust-lang/wg-async-foundations` \[EDIT: this doesn't seem to have pinged anybody 😩, thanks `@yoshuawuyts` for the real ping\] r? `@joshtriplett` ___ # Docs preview https://user-images.githubusercontent.com/9920355/150605731-1f45c2eb-c9b0-4ce3-b17f-2784fb75786e.mp4 ___ # Implementation The implementation ends up being dead simple (so much it's embarrassing): ```rust pub macro pin($value:expr $(,)?) { Pin { pointer: &mut { $value } } } ``` _and voilà_! - The key for it working lies in [the rules governing the scope of anonymous temporaries](https://doc.rust-lang.org/1.58.1/reference/destructors.html#temporary-lifetime-extension). <details><summary>Comments and context</summary> This is `Pin::new_unchecked(&mut { $value })`, so, for starters, let's review such a hypothetical macro (that any user-code could define): ```rust macro_rules! pin {( $value:expr ) => ( match &mut { $value } { at_value => unsafe { // Do not wrap `$value` in an `unsafe` block. $crate::pin::Pin::<&mut _>::new_unchecked(at_value) }} )} ``` Safety: - `type P = &mut _`. There are thus no pathological `Deref{,Mut}` impls that would break `Pin`'s invariants. - `{ $value }` is braced, making it a _block expression_, thus **moving** the given `$value`, and making it _become an **anonymous** temporary_. By virtue of being anonynomous, it can no longer be accessed, thus preventing any attemps to `mem::replace` it or `mem::forget` it, _etc._ This gives us a `pin!` definition that is sound, and which works, but only in certain scenarios: - If the `pin!(value)` expression is _directly_ fed to a function call: `let poll = pin!(fut).poll(cx);` - If the `pin!(value)` expression is part of a scrutinee: ```rust match pin!(fut) { pinned_fut => { pinned_fut.as_mut().poll(...); pinned_fut.as_mut().poll(...); }} // <- `fut` is dropped here. ``` Alas, it doesn't work for the more straight-forward use-case: `let` bindings. ```rust let pinned_fut = pin!(fut); // <- temporary value is freed at the end of this statement pinned_fut.poll(...) // error[E0716]: temporary value dropped while borrowed // note: consider using a `let` binding to create a longer lived value ``` - Issues such as this one are the ones motivating rust-lang/rfcs#66 This makes such a macro incredibly unergonomic in practice, and the reason most macros out there had to take the path of being a statement/binding macro (_e.g._, `pin!(future);`) instead of featuring the more intuitive ergonomics of an expression macro. Luckily, there is a way to avoid the problem. Indeed, the problem stems from the fact that a temporary is dropped at the end of its enclosing statement when it is part of the parameters given to function call, which has precisely been the case with our `Pin::new_unchecked()`! For instance, ```rust let p = Pin::new_unchecked(&mut <temporary>); ``` becomes: ```rust let p = { let mut anon = <temporary>; &mut anon }; ``` However, when using a literal braced struct to construct the value, references to temporaries can then be taken. This makes Rust change the lifespan of such temporaries so that they are, instead, dropped _at the end of the enscoping block_. For instance, ```rust let p = Pin { pointer: &mut <temporary> }; ``` becomes: ```rust let mut anon = <temporary>; let p = Pin { pointer: &mut anon }; ``` which is *exactly* what we want. Finally, we don't hit problems _w.r.t._ the privacy of the `pointer` field, or the unqualified `Pin` name, thanks to `decl_macro`s being _fully_ hygienic (`def_site` hygiene). </details> ___ # TODO - [x] Add compile-fail tests with attempts to break the `Pin` invariants thanks to the macro (_e.g._, try to access the private `.pointer` field, or see what happens if such a pin is used outside its enscoping scope (borrow error)); - [ ] Follow-up stuff: - [ ] Try to experiment with adding `pin!` to the prelude: this may require to be handled with some extra care, as it may lead to issues reminiscent of those of `assert_matches!`: rust-lang#82913 - [x] Create the tracking issue.
2 parents 6655109 + bf2a9dc commit 6421a49

12 files changed

+404
-1
lines changed
 

‎compiler/rustc_feature/src/active.rs

+3
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ declare_features! (
161161
(active, staged_api, "1.0.0", None, None),
162162
/// Added for testing E0705; perma-unstable.
163163
(active, test_2018_feature, "1.31.0", None, Some(Edition::Edition2018)),
164+
/// Allows non-`unsafe` —and thus, unsound— access to `Pin` constructions.
165+
/// Marked `incomplete` since perma-unstable and unsound.
166+
(incomplete, unsafe_pin_internals, "1.60.0", None, None),
164167
/// Use for stable + negative coherence and strict coherence depending on trait's
165168
/// rustc_strict_coherence value.
166169
(active, with_negative_coherence, "1.60.0", None, None),

‎compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1455,6 +1455,7 @@ symbols! {
14551455
unsafe_block_in_unsafe_fn,
14561456
unsafe_cell,
14571457
unsafe_no_drop_flag,
1458+
unsafe_pin_internals,
14581459
unsize,
14591460
unsized_fn_params,
14601461
unsized_locals,

‎library/core/src/pin.rs

+248-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,14 @@ use crate::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver};
406406
#[repr(transparent)]
407407
#[derive(Copy, Clone)]
408408
pub struct Pin<P> {
409-
pointer: P,
409+
// FIXME(#93176): this field is made `#[unstable] #[doc(hidden)] pub` to:
410+
// - deter downstream users from accessing it (which would be unsound!),
411+
// - let the `pin!` macro access it (such a macro requires using struct
412+
// literal syntax in order to benefit from lifetime extension).
413+
// Long-term, `unsafe` fields or macro hygiene are expected to offer more robust alternatives.
414+
#[unstable(feature = "unsafe_pin_internals", issue = "none")]
415+
#[doc(hidden)]
416+
pub pointer: P,
410417
}
411418

412419
// The following implementations aren't derived in order to avoid soundness
@@ -909,3 +916,243 @@ impl<P, U> CoerceUnsized<Pin<U>> for Pin<P> where P: CoerceUnsized<U> {}
909916

910917
#[stable(feature = "pin", since = "1.33.0")]
911918
impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
919+
920+
/// Constructs a <code>[Pin]<[&mut] T></code>, by pinning[^1] a `value: T` _locally_[^2].
921+
///
922+
/// Unlike [`Box::pin`], this does not involve a heap allocation.
923+
///
924+
/// [^1]: If the (type `T` of the) given value does not implement [`Unpin`], then this
925+
/// effectively pins the `value` in memory, where it will be unable to be moved.
926+
/// Otherwise, <code>[Pin]<[&mut] T></code> behaves like <code>[&mut] T</code>, and operations such
927+
/// as [`mem::replace()`][crate::mem::replace] will allow extracting that value, and therefore,
928+
/// moving it.
929+
/// See [the `Unpin` section of the `pin` module][self#unpin] for more info.
930+
///
931+
/// [^2]: This is usually dubbed "stack"-pinning. And whilst local values are almost always located
932+
/// in the stack (_e.g._, when within the body of a non-`async` function), the truth is that inside
933+
/// the body of an `async fn` or block —more generally, the body of a generator— any locals crossing
934+
/// an `.await` point —a `yield` point— end up being part of the state captured by the `Future` —by
935+
/// the `Generator`—, and thus will be stored wherever that one is.
936+
///
937+
/// ## Examples
938+
///
939+
/// ### Basic usage
940+
///
941+
/// ```rust
942+
/// #![feature(pin_macro)]
943+
/// # use core::marker::PhantomPinned as Foo;
944+
/// use core::pin::{pin, Pin};
945+
///
946+
/// fn stuff(foo: Pin<&mut Foo>) {
947+
/// // …
948+
/// # let _ = foo;
949+
/// }
950+
///
951+
/// let pinned_foo = pin!(Foo { /* … */ });
952+
/// stuff(pinned_foo);
953+
/// // or, directly:
954+
/// stuff(pin!(Foo { /* … */ }));
955+
/// ```
956+
///
957+
/// ### Manually polling a `Future` (wihout `Unpin` bounds)
958+
///
959+
/// ```rust
960+
/// #![feature(pin_macro)]
961+
/// use std::{
962+
/// future::Future,
963+
/// pin::pin,
964+
/// task::{Context, Poll},
965+
/// thread,
966+
/// };
967+
/// # use std::{sync::Arc, task::Wake, thread::Thread};
968+
///
969+
/// # /// A waker that wakes up the current thread when called.
970+
/// # struct ThreadWaker(Thread);
971+
/// #
972+
/// # impl Wake for ThreadWaker {
973+
/// # fn wake(self: Arc<Self>) {
974+
/// # self.0.unpark();
975+
/// # }
976+
/// # }
977+
/// #
978+
/// /// Runs a future to completion.
979+
/// fn block_on<Fut: Future>(fut: Fut) -> Fut::Output {
980+
/// let waker_that_unparks_thread = // …
981+
/// # Arc::new(ThreadWaker(thread::current())).into();
982+
/// let mut cx = Context::from_waker(&waker_that_unparks_thread);
983+
/// // Pin the future so it can be polled.
984+
/// let mut pinned_fut = pin!(fut);
985+
/// loop {
986+
/// match pinned_fut.as_mut().poll(&mut cx) {
987+
/// Poll::Pending => thread::park(),
988+
/// Poll::Ready(res) => return res,
989+
/// }
990+
/// }
991+
/// }
992+
/// #
993+
/// # assert_eq!(42, block_on(async { 42 }));
994+
/// ```
995+
///
996+
/// ### With `Generator`s
997+
///
998+
/// ```rust
999+
/// #![feature(generators, generator_trait, pin_macro)]
1000+
/// use core::{
1001+
/// ops::{Generator, GeneratorState},
1002+
/// pin::pin,
1003+
/// };
1004+
///
1005+
/// fn generator_fn() -> impl Generator<Yield = usize, Return = ()> /* not Unpin */ {
1006+
/// // Allow generator to be self-referential (not `Unpin`)
1007+
/// // vvvvvv so that locals can cross yield points.
1008+
/// static || {
1009+
/// let foo = String::from("foo"); // --+
1010+
/// yield 0; // | <- crosses yield point!
1011+
/// println!("{}", &foo); // <----------+
1012+
/// yield foo.len();
1013+
/// }
1014+
/// }
1015+
///
1016+
/// fn main() {
1017+
/// let mut generator = pin!(generator_fn());
1018+
/// match generator.as_mut().resume(()) {
1019+
/// GeneratorState::Yielded(0) => {},
1020+
/// _ => unreachable!(),
1021+
/// }
1022+
/// match generator.as_mut().resume(()) {
1023+
/// GeneratorState::Yielded(3) => {},
1024+
/// _ => unreachable!(),
1025+
/// }
1026+
/// match generator.resume(()) {
1027+
/// GeneratorState::Yielded(_) => unreachable!(),
1028+
/// GeneratorState::Complete(()) => {},
1029+
/// }
1030+
/// }
1031+
/// ```
1032+
///
1033+
/// ## Remarks
1034+
///
1035+
/// Precisely because a value is pinned to local storage, the resulting <code>[Pin]<[&mut] T></code>
1036+
/// reference ends up borrowing a local tied to that block: it can't escape it.
1037+
///
1038+
/// The following, for instance, fails to compile:
1039+
///
1040+
/// ```rust,compile_fail
1041+
/// #![feature(pin_macro)]
1042+
/// use core::pin::{pin, Pin};
1043+
/// # use core::{marker::PhantomPinned as Foo, mem::drop as stuff};
1044+
///
1045+
/// let x: Pin<&mut Foo> = {
1046+
/// let x: Pin<&mut Foo> = pin!(Foo { /* … */ });
1047+
/// x
1048+
/// }; // <- Foo is dropped
1049+
/// stuff(x); // Error: use of dropped value
1050+
/// ```
1051+
///
1052+
/// <details><summary>Error message</summary>
1053+
///
1054+
/// ```console
1055+
/// error[E0716]: temporary value dropped while borrowed
1056+
/// --> src/main.rs:9:28
1057+
/// |
1058+
/// 8 | let x: Pin<&mut Foo> = {
1059+
/// | - borrow later stored here
1060+
/// 9 | let x: Pin<&mut Foo> = pin!(Foo { /* … */ });
1061+
/// | ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
1062+
/// 10 | x
1063+
/// 11 | }; // <- Foo is dropped
1064+
/// | - temporary value is freed at the end of this statement
1065+
/// |
1066+
/// = note: consider using a `let` binding to create a longer lived value
1067+
/// ```
1068+
///
1069+
/// </details>
1070+
///
1071+
/// This makes [`pin!`] **unsuitable to pin values when intending to _return_ them**. Instead, the
1072+
/// value is expected to be passed around _unpinned_ until the point where it is to be consumed,
1073+
/// where it is then useful and even sensible to pin the value locally using [`pin!`].
1074+
///
1075+
/// If you really need to return a pinned value, consider using [`Box::pin`] instead.
1076+
///
1077+
/// On the other hand, pinning to the stack[<sup>2</sup>](#fn2) using [`pin!`] is likely to be
1078+
/// cheaper than pinning into a fresh heap allocation using [`Box::pin`]. Moreover, by virtue of not
1079+
/// even needing an allocator, [`pin!`] is the main non-`unsafe` `#![no_std]`-compatible [`Pin`]
1080+
/// constructor.
1081+
///
1082+
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
1083+
#[unstable(feature = "pin_macro", issue = "93178")]
1084+
#[rustc_macro_transparency = "semitransparent"]
1085+
#[allow_internal_unstable(unsafe_pin_internals)]
1086+
pub macro pin($value:expr $(,)?) {
1087+
// This is `Pin::new_unchecked(&mut { $value })`, so, for starters, let's
1088+
// review such a hypothetical macro (that any user-code could define):
1089+
//
1090+
// ```rust
1091+
// macro_rules! pin {( $value:expr ) => (
1092+
// match &mut { $value } { at_value => unsafe { // Do not wrap `$value` in an `unsafe` block.
1093+
// $crate::pin::Pin::<&mut _>::new_unchecked(at_value)
1094+
// }}
1095+
// )}
1096+
// ```
1097+
//
1098+
// Safety:
1099+
// - `type P = &mut _`. There are thus no pathological `Deref{,Mut}` impls
1100+
// that would break `Pin`'s invariants.
1101+
// - `{ $value }` is braced, making it a _block expression_, thus **moving**
1102+
// the given `$value`, and making it _become an **anonymous** temporary_.
1103+
// By virtue of being anonynomous, it can no longer be accessed, thus
1104+
// preventing any attemps to `mem::replace` it or `mem::forget` it, _etc._
1105+
//
1106+
// This gives us a `pin!` definition that is sound, and which works, but only
1107+
// in certain scenarios:
1108+
// - If the `pin!(value)` expression is _directly_ fed to a function call:
1109+
// `let poll = pin!(fut).poll(cx);`
1110+
// - If the `pin!(value)` expression is part of a scrutinee:
1111+
// ```rust
1112+
// match pin!(fut) { pinned_fut => {
1113+
// pinned_fut.as_mut().poll(...);
1114+
// pinned_fut.as_mut().poll(...);
1115+
// }} // <- `fut` is dropped here.
1116+
// ```
1117+
// Alas, it doesn't work for the more straight-forward use-case: `let` bindings.
1118+
// ```rust
1119+
// let pinned_fut = pin!(fut); // <- temporary value is freed at the end of this statement
1120+
// pinned_fut.poll(...) // error[E0716]: temporary value dropped while borrowed
1121+
// // note: consider using a `let` binding to create a longer lived value
1122+
// ```
1123+
// - Issues such as this one are the ones motivating https://github.com/rust-lang/rfcs/pull/66
1124+
//
1125+
// This makes such a macro incredibly unergonomic in practice, and the reason most macros
1126+
// out there had to take the path of being a statement/binding macro (_e.g._, `pin!(future);`)
1127+
// instead of featuring the more intuitive ergonomics of an expression macro.
1128+
//
1129+
// Luckily, there is a way to avoid the problem. Indeed, the problem stems from the fact that a
1130+
// temporary is dropped at the end of its enclosing statement when it is part of the parameters
1131+
// given to function call, which has precisely been the case with our `Pin::new_unchecked()`!
1132+
// For instance,
1133+
// ```rust
1134+
// let p = Pin::new_unchecked(&mut <temporary>);
1135+
// ```
1136+
// becomes:
1137+
// ```rust
1138+
// let p = { let mut anon = <temporary>; &mut anon };
1139+
// ```
1140+
//
1141+
// However, when using a literal braced struct to construct the value, references to temporaries
1142+
// can then be taken. This makes Rust change the lifespan of such temporaries so that they are,
1143+
// instead, dropped _at the end of the enscoping block_.
1144+
// For instance,
1145+
// ```rust
1146+
// let p = Pin { pointer: &mut <temporary> };
1147+
// ```
1148+
// becomes:
1149+
// ```rust
1150+
// let mut anon = <temporary>;
1151+
// let p = Pin { pointer: &mut anon };
1152+
// ```
1153+
// which is *exactly* what we want.
1154+
//
1155+
// See https://doc.rust-lang.org/1.58.1/reference/destructors.html#temporary-lifetime-extension
1156+
// for more info.
1157+
$crate::pin::Pin::<&mut _> { pointer: &mut { $value } }
1158+
}

‎library/core/tests/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#![feature(inline_const)]
4646
#![feature(is_sorted)]
4747
#![feature(pattern)]
48+
#![feature(pin_macro)]
4849
#![feature(sort_internals)]
4950
#![feature(slice_take)]
5051
#![feature(maybe_uninit_uninit_array)]
@@ -122,6 +123,7 @@ mod ops;
122123
mod option;
123124
mod pattern;
124125
mod pin;
126+
mod pin_macro;
125127
mod ptr;
126128
mod result;
127129
mod simd;

‎library/core/tests/pin_macro.rs

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// edition:2021
2+
use core::{
3+
marker::PhantomPinned,
4+
mem::{drop as stuff, transmute},
5+
pin::{pin, Pin},
6+
};
7+
8+
#[test]
9+
fn basic() {
10+
let it: Pin<&mut PhantomPinned> = pin!(PhantomPinned);
11+
stuff(it);
12+
}
13+
14+
#[test]
15+
fn extension_works_through_block() {
16+
let it: Pin<&mut PhantomPinned> = { pin!(PhantomPinned) };
17+
stuff(it);
18+
}
19+
20+
#[test]
21+
fn extension_works_through_unsafe_block() {
22+
// "retro-type-inference" works as well.
23+
let it: Pin<&mut PhantomPinned> = unsafe { pin!(transmute(())) };
24+
stuff(it);
25+
}
26+
27+
#[test]
28+
fn unsize_coercion() {
29+
let slice: Pin<&mut [PhantomPinned]> = pin!([PhantomPinned; 2]);
30+
stuff(slice);
31+
let dyn_obj: Pin<&mut dyn Send> = pin!([PhantomPinned; 2]);
32+
stuff(dyn_obj);
33+
}

‎src/test/rustdoc-js-std/typed-query.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ const EXPECTED = {
88
{ 'path': 'std', 'name': 'eprint' },
99
{ 'path': 'std', 'name': 'println' },
1010
{ 'path': 'std', 'name': 'eprintln' },
11+
{ 'path': 'std::pin', 'name': 'pin' },
12+
{ 'path': 'core::pin', 'name': 'pin' },
1113
],
1214
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// edition:2018
2+
#![forbid(incomplete_features, unsafe_code)]
3+
#![feature(unsafe_pin_internals)]
4+
//~^ ERROR the feature `unsafe_pin_internals` is incomplete and may not be safe to use
5+
6+
use core::{marker::PhantomPinned, pin::Pin};
7+
8+
/// The `unsafe_pin_internals` is indeed unsound.
9+
fn non_unsafe_pin_new_unchecked<T>(pointer: &mut T) -> Pin<&mut T> {
10+
Pin { pointer }
11+
}
12+
13+
fn main() {
14+
let mut self_referential = PhantomPinned;
15+
let _: Pin<&mut PhantomPinned> = non_unsafe_pin_new_unchecked(&mut self_referential);
16+
core::mem::forget(self_referential); // move and disable drop glue!
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: the feature `unsafe_pin_internals` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/feature-gate-unsafe_pin_internals.rs:3:12
3+
|
4+
LL | #![feature(unsafe_pin_internals)]
5+
| ^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> $DIR/feature-gate-unsafe_pin_internals.rs:2:11
9+
|
10+
LL | #![forbid(incomplete_features, unsafe_code)]
11+
| ^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to previous error
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// edition:2018
2+
#![feature(pin_macro)]
3+
4+
use core::{
5+
marker::PhantomPinned,
6+
mem,
7+
pin::{pin, Pin},
8+
};
9+
10+
fn main() {
11+
let mut phantom_pinned = pin!(PhantomPinned);
12+
mem::take(phantom_pinned.pointer); //~ ERROR use of unstable library feature 'unsafe_pin_internals'
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0658]: use of unstable library feature 'unsafe_pin_internals'
2+
--> $DIR/cant_access_internals.rs:12:15
3+
|
4+
LL | mem::take(phantom_pinned.pointer);
5+
| ^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add `#![feature(unsafe_pin_internals)]` to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0658`.
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.