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

use pin_project::pin_project;
use std::marker::PhantomPinned;

#[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>>()
}