Debian Codegraph @

third_party/rust/pin-project-lite/tests/expand/pinned_drop/enum.rs

raw
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
2
3 use pin_project_lite::pin_project;
4
5 pin_project! {
6 #[project = EnumProj]
7 #[project_ref = EnumProjRef]
8 enum Enum<T, U> {
9 Struct {
10 #[pin]
11 pinned: T,
12 unpinned: U,
13 },
14 Unit,
15 }
16 impl<T, U> PinnedDrop for Enum<T, U> {
17 fn drop(this: Pin<&mut Self>) {
18 let _ = this;
19 }
20 }
21 }
22
23 fn main() {}