Debian Codegraph @

third_party/rust/pin-project/tests/ui/unstable-features/marker_trait_attr-feature-gate.rs

raw
1 // Note: If you change this test, change 'marker_trait_attr.rs' at the same time.
2
3 use std::marker::PhantomPinned;
4
5 use pin_project::pin_project;
6
7 #[pin_project] //~ ERROR E0119
8 struct Struct<T> {
9 #[pin]
10 f: T,
11 }
12
13 // unsound Unpin impl
14 impl<T> Unpin for Struct<T> {}
15
16 fn is_unpin<T: Unpin>() {}
17
18 fn main() {
19 is_unpin::<Struct<PhantomPinned>>()
20 }