aboutsummaryrefslogtreecommitdiff
path: root/examples/project_replace-expanded.rs
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2021-02-24 11:06:07 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-24 11:06:07 +0000
commit3e9a78f8a652042b466f19f7cfd9a72c7e6967c0 (patch)
treeaa583765ea0c0fd8bddb46d99bb04eae1334edd3 /examples/project_replace-expanded.rs
parentc694fc9d044796eb31ecf3456938c2bdc860eee9 (diff)
parent60a03099d28e22afae51d4f99453c38ecb98a652 (diff)
downloadpin-project-3e9a78f8a652042b466f19f7cfd9a72c7e6967c0.tar.gz
Upgrade rust/crates/pin-project to 1.0.5 am: c1311073c0 am: 839279b456 am: 60a03099d2
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pin-project/+/1581962 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ifa1741fbe71f9eceb5b2e7262bd8258cea0ea6cf
Diffstat (limited to 'examples/project_replace-expanded.rs')
-rw-r--r--examples/project_replace-expanded.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/project_replace-expanded.rs b/examples/project_replace-expanded.rs
index ec00d41..4f43bda 100644
--- a/examples/project_replace-expanded.rs
+++ b/examples/project_replace-expanded.rs
@@ -76,13 +76,6 @@ const _: () = {
) -> __StructProjectionOwned<T, U> {
unsafe {
let __self_ptr: *mut Self = self.get_unchecked_mut();
- let Self { pinned, unpinned } = &mut *__self_ptr;
-
- // First, extract all the unpinned fields
- let __result = __StructProjectionOwned {
- pinned: ::pin_project::__private::PhantomData,
- unpinned: ::pin_project::__private::ptr::read(unpinned),
- };
// Destructors will run in reverse order, so next create a guard to overwrite
// `self` with the replacement value without calling destructors.
@@ -91,6 +84,14 @@ const _: () = {
value: ::pin_project::__private::ManuallyDrop::new(__replacement),
};
+ let Self { pinned, unpinned } = &mut *__self_ptr;
+
+ // First, extract all the unpinned fields
+ let __result = __StructProjectionOwned {
+ pinned: ::pin_project::__private::PhantomData,
+ unpinned: ::pin_project::__private::ptr::read(unpinned),
+ };
+
// Now create guards to drop all the pinned fields
//
// Due to a compiler bug (https://github.com/rust-lang/rust/issues/47949)