All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
0.2.13 - 2023-08-25
- Allow attributes in impl and method of
PinnedDrop
implementation.
0.2.12 - 2023-08-09
- Work around an issue where the projected types/methods appear in the documentation as if they were part of the public API if the visibility is not correctly parsed due to the rustc bug. See #77 for details.
0.2.11 - 2023-08-06
- Add support for
#[project(!Unpin)]
. This is equivalent to pin-project's !Unpin option. (#76, thanks @matheus-consoli)
0.2.10 - 2023-07-02
- Inline project methods. (#74, thanks @EFanZh)
0.2.9 - 2022-04-26
- Improve compile time of
pin_project!
calls. (#71, thanks @nnethercote)
0.2.8 - 2021-12-31
- Fix handling of trailing commas in
PinnedDrop
impl. (#64, thanks @Michael-J-Ward)
0.2.7 - 2021-06-26
- Support custom Drop implementation. See #25 for details.
0.2.6 - 2021-03-04
- Support item attributes in any order. (#57, thanks @SabrinaJewson)
0.2.5 - 2021-03-02
- Prepare for removal of
safe_packed_borrows
lint. See #55 for details.
0.2.4 - 2021-01-11
Note: This release has been yanked. See #55 for details.
- Add
project_replace
. (#43, thanks @Marwes)
0.2.3 - 2021-01-09
Note: This release has been yanked. See #55 for details.
0.2.2 - 2021-01-09
Note: This release has been yanked.** See #55 for details.
0.2.1 - 2021-01-05
Note: This release has been yanked. See #55 for details.
- Exclude unneeded files from crates.io.
0.2.0 - 2020-11-13
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; }
0.1.12 - 2021-03-02
- Prepare for removal of
safe_packed_borrows
lint. See #55 for details.
0.1.11 - 2020-10-20
Note: This release has been yanked. See #55 for details.
-
Suppress
clippy::redundant_pub_crate
lint in generated code. -
Documentation improvements.
0.1.10 - 2020-10-01
Note: This release has been yanked. See #55 for details.
- Suppress
drop_bounds
lint, which will be added to rustc in the future. See taiki-e/pin-project#272 for more details.
0.1.9 - 2020-09-29
Note: This release has been yanked. See #55 for details.
0.1.8 - 2020-09-26
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.
0.1.7 - 2020-06-04
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.
0.1.6 - 2020-05-31
Note: This release has been yanked. See #55 for details.
-
Documentation improvements.
0.1.5 - 2020-05-07
Note: This release has been yanked. See #55 for details.
0.1.4 - 2020-01-20
Note: This release has been yanked. See #55 for details.
0.1.3 - 2020-01-20
Note: This release has been yanked. See #55 for details.
0.1.2 - 2020-01-05
Note: This release has been yanked. See #55 for details.
- Support recognizing default generic parameters. (#6, thanks @kennytm)
0.1.1 - 2019-11-15
Note: This release has been yanked. See #55 for details.
0.1.0 - 2019-10-22
Note: This release has been yanked. See #55 for details.
Initial release