-
-
Save rust-play/71de1284b6a3966302b1ddf88960e003 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use core::pin::Pin; | |
use core::marker::PhantomPinned; | |
#[derive(Debug)] | |
struct Unm(i32, PhantomPinned); | |
fn foo() -> Pin<Box<Unm>> { | |
Box::pin(Unm(1, PhantomPinned)) | |
} | |
fn main() { | |
let mut f = foo(); | |
//let u: &mut Unm = f.as_mut().get_mut(); | |
//Pin::into_inner(f); | |
dbg![f]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment