Current prerelease: 0.4.0-beta.1
The most important fix of this release is that pin projection has become a safe operation (#18, thanks @Aaron1011)
Changes
TODO
Some adjustments are needed.
Unresolved issues
Blockers
I plan to have a few alpha releases before the blockers are resolved.
Current prerelease: 0.4.0-beta.1
The most important fix of this release is that pin projection has become a safe operation (#18, thanks @Aaron1011)
Changes
#[unsafe_project]has been replaced with#[pin_project]. (Replaceunsafe_projectwith safepin_projectableattribute #18, Remove pin_project! macro and add #[pinned_drop] attribute #33)Unpinargument has been removed - anUnpinimpl is now generated by default. (Replaceunsafe_projectwith safepin_projectableattribute #18)#[pinned_drop]attribute instead of via a normalDropimpl. (Replaceunsafe_projectwith safepin_projectableattribute #18, Remove pin_project! macro and add #[pinned_drop] attribute #33, Change #[pinned_drop] to trait implementation #86)Unpinimpls must be specified with an impl ofUnsafeUnpin, instead of implementing the normalUnpintrait. (Replaceunsafe_projectwith safepin_projectableattribute #18)ChangedEDIT: reverted in Change the argument type of project method back toprojectmethod generated by#[pin_project]attribute to take an&mut Pin<&mut Self>argument. (Make generated 'project' reference take an '&mut Pin<&mut Self>' #47)self: Pin<&mut Self>#90#[project]attribute (Remove "project_attr" feature and always enable #[project] attribute #94)#[project]attribute can now be used forimplblocks. (Add impl block support to #[project] attribute #46)#[project]attribute can now be used forusestatements. (Add use statements support to #[project] attribute #85)MadeEDIT: replaced with Remove "project_attr" feature and always enable #[project] attribute #94#[project]attribute disabled by default. (Should #[project] attribute be disabled by default? #36, Make #[project] attribute disabled by default #41)project_refmethod and#[project_ref]attribute. (Add project_ref method and #[project_ref] attribute #93)#[pin_project]attribute now determines the visibility of the projection type/method is based on the original type. (Determine the visibility based on the original type #96)TODO
Some adjustments are needed.
unsafe_projectwith safepin_projectableattribute #18 (comment)); done in Cleanup #22unsafe_UnpinvsUnsafeUnpinvsunsafe_unpin(Replaceunsafe_projectwith safepin_projectableattribute #18 (comment)); done in Change 'unsafe_Unpin' to UpperCamelCase (UnsafeUnpin) #40 (AdoptedUnsafeUnpin).Test code examples in README (Test code examples in README #19)EDIT: see Test code examples in README #19 (comment)repr(packed)checking by hiding it in a proc-macro-attribute #32 in the documents; done in Ensure that #[repr(packed)] cannot be used on #[pin_projectable] structs #34Unresolved issues
UnpinvsDrop(Weirdly different approach toUnpinvsDrop#26); done in Change #[pinned_drop] to trait implementation #86self: Pin<&mut Self>(Change the argument type of project method back toself: Pin<&mut Self>#89)Blockers
Whether or notEDIT: replaced with Change the argument type of project method back toself: &mut Pin<&mut Self>stabilizes in Rust 1.39 (Stabilize nested self receivers in 1.41.0 rust-lang/rust#64325)self: Pin<&mut Self>#89I plan to have a few alpha releases before the blockers are resolved.