Debian Codegraph @

third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs

raw
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
2
3 use std::marker::PhantomPinned;
4
5 use pin_project_lite::pin_project;
6
7 pin_project! {
8 struct Foo<T> {
9 #[pin]
10 inner: T,
11 }
12 }
13
14 struct __Origin {}
15
16 impl Unpin for __Origin {}
17
18 fn is_unpin<T: Unpin>() {}
19
20 fn main() {
21 is_unpin::<Foo<PhantomPinned>>(); //~ ERROR E0277
22 }