fnb<'a>(self: Pin<&'aSelf>) -> &'aString { assert!(!self.b.is_null(), "Test::b called without Test::init being called first"); unsafe { &*(self.b) } } }
/Users/yanick/.cargo/bin/cargo build --color=always --message-format=json-diagnostic-rendered-ansi --package helloworld --bin helloworld Compiling helloworld v0.1.0 (/Users/yanick/Codes/rust/helloworld) error[E0277]: `PhantomPinned` cannot be unpinned --> src/main.rs:46:26 | 46 | std::mem::swap(test1.get_mut(), test2.get_mut()); | ^^^^^^^ within `Test`, the trait `Unpin` is not implemented for `PhantomPinned` | = note: required because it appears within the type `Test`
error[E0277]: `PhantomPinned` cannot be unpinned --> src/main.rs:46:43 | 46 | std::mem::swap(test1.get_mut(), test2.get_mut()); | ^^^^^^^ within `Test`, the trait `Unpin` is not implemented for `PhantomPinned` | = note: required because it appears within the type `Test`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`. error: could not compile `helloworld` To learn more, run the command again with --verbose. Process finished with exit code 101
#[stable(feature = "futures_api", since = "1.36.0")] impl<P> Future for Pin<P> where P: Unpin + ops::DerefMut<Target: Future>, { typeOutput = <<P as ops::Deref>::Target as Future>::Output;