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

#![allow(dead_code)]

use pin_project::{pin_project, UnsafeUnpin};

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

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

fn main() {}