Source code
Revision control
Copy as Markdown
Other Tools
#![feature(negative_impls)]
#![deny(suspicious_auto_trait_impls)]
#[pin_project::pin_project]
struct Foo<Pinned, Unpinned> {
#[pin]
pinned: Pinned,
unpinned: Unpinned,
}
struct MyPhantomPinned {}
impl !Unpin for MyPhantomPinned {}
impl Unpin for Foo<MyPhantomPinned, ()> {}
fn is_unpin<T: Unpin>() {}
fn main() {
is_unpin::<Foo<MyPhantomPinned, ()>>()
}