summaryrefslogtreecommitdiffstats
path: root/third_party/rust/pin-project/examples/unsafe_unpin.rs
blob: 9056808d6f1e46ea6c524a23380f30fa9fd1b252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// See ./pinned_drop-expanded.rs for generated code.

#![allow(dead_code)]

use pin_project::{pin_project, UnsafeUnpin};

#[pin_project(UnsafeUnpin)]
pub struct Foo<T, U> {
    #[pin]
    pinned: T,
    unpinned: U,
}

unsafe impl<T: Unpin, U> UnsafeUnpin for Foo<T, U> {}

fn main() {}