diff options
Diffstat (limited to 'tests/ui/cfg/proper_unpin.rs')
-rw-r--r-- | tests/ui/cfg/proper_unpin.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/ui/cfg/proper_unpin.rs b/tests/ui/cfg/proper_unpin.rs deleted file mode 100644 index b7bb04d..0000000 --- a/tests/ui/cfg/proper_unpin.rs +++ /dev/null @@ -1,28 +0,0 @@ -use pin_project::pin_project; -use std::marker::PhantomPinned; - -#[pin_project] -struct Foo<T> { - #[cfg(any())] - #[pin] - inner: T, - #[cfg(not(any()))] - inner: T, -} - -#[pin_project] -struct Bar<T> { - #[cfg(any())] - inner: T, - #[cfg(not(any()))] - #[pin] - inner: T, -} - -fn is_unpin<T: Unpin>() {} - -fn main() { - is_unpin::<Foo<PhantomPinned>>(); // Ok - is_unpin::<Bar<()>>(); // Ok - is_unpin::<Bar<PhantomPinned>>(); //~ ERROR E0277 -} |