aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs
blob: 542250bd902b6297ac0c3abfd14fa2e0de701cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Note: If you change this test, change 'marker_trait_attr.rs' at the same time.

use std::marker::PhantomPinned;

use pin_project::pin_project;

#[pin_project] //~ ERROR E0119
struct Struct<T> {
    #[pin]
    f: T,
}

// unsound Unpin impl
impl<T> Unpin for Struct<T> {}

fn is_unpin<T: Unpin>() {}

fn main() {
    is_unpin::<Struct<PhantomPinned>>()
}