All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
PinnedDrop
. (#83, thanks @jbr)PinnedDrop
implementation.#[project(!Unpin)]
. This is equivalent to pin-project's !Unpin option. (#76, thanks @matheus-consoli)pin_project!
calls. (#71, thanks @nnethercote)PinnedDrop
impl. (#64, thanks @Michael-J-Ward)safe_packed_borrows
lint. See #55 for details.Note: This release has been yanked. See #55 for details.
project_replace
. (#43, thanks @Marwes)Note: This release has been yanked. See #55 for details.
Note: This release has been yanked.** See #55 for details.
Note: This release has been yanked. See #55 for details.
Note: This release has been yanked. See #55 for details.
pin_project!
macro now supports enums.
To use pin_project!
on enums, you need to name the projection type returned from the method.
use pin_project_lite::pin_project; use std::pin::Pin; pin_project! { #[project = EnumProj] enum Enum<T, U> { Variant { #[pin] pinned: T, unpinned: U }, } } impl<T, U> Enum<T, U> { fn method(self: Pin<&mut Self>) { match self.project() { EnumProj::Variant { pinned, unpinned } => { let _: Pin<&mut T> = pinned; let _: &mut U = unpinned; } } } }
Support naming the projection types.
By passing an attribute with the same name as the method, you can name the projection type returned from the method:
use pin_project_lite::pin_project; use std::pin::Pin; pin_project! { #[project = StructProj] struct Struct<T> { #[pin] field: T, } } fn func<T>(x: Pin<&mut Struct<T>>) { let StructProj { field } = x.project(); let _: Pin<&mut T> = field; }
safe_packed_borrows
lint. See #55 for details.Note: This release has been yanked. See #55 for details.
Suppress clippy::redundant_pub_crate
lint in generated code.
Documentation improvements.
Note: This release has been yanked. See #55 for details.
drop_bounds
lint, which will be added to rustc in the future. See taiki-e/pin-project#272 for more details.Note: This release has been yanked. See #55 for details.
Note: This release has been yanked. See #55 for details.
Fix compatibility of generated code with forbid(future_incompatible)
.
Note: This does not guarantee compatibility with forbid(future_incompatible)
in the future. If rustc adds a new lint, we may not be able to keep this.
Note: This release has been yanked. See #55 for details.
Fix lifetime inference error when an associated type is used in fields.
Suppress clippy::used_underscore_binding
lint in generated code.
Documentation improvements.
Note: This release has been yanked. See #55 for details.
Documentation improvements.
Note: This release has been yanked. See #55 for details.
Note: This release has been yanked. See #55 for details.
Note: This release has been yanked. See #55 for details.
Note: This release has been yanked. See #55 for details.
Note: This release has been yanked. See #55 for details.
Note: This release has been yanked. See #55 for details.
Initial release