aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/unsafe_unpin/not-implement-unsafe-unpin.rs
blob: 429d60f0446013a91d976c46866b4fbaff24c7cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use pin_project::pin_project;

#[pin_project(UnsafeUnpin)]
struct Struct<T, U> {
    #[pin]
    inner: T,
    other: U,
}

fn is_unpin<T: Unpin>() {}

fn main() {
    is_unpin::<Struct<(), ()>>(); //~ ERROR E0277
}