1# Changelog 2 3All notable changes to this project will be documented in this file. 4 5This project adheres to [Semantic Versioning](https://semver.org). 6 7<!-- 8Note: In this file, do not use the hard wrap in the middle of a sentence for compatibility with GitHub comment style markdown rendering. 9--> 10 11## [Unreleased] 12 13## [0.2.13] - 2023-08-25 14 15- Allow attributes in impl and method of `PinnedDrop` implementation. 16 17## [0.2.12] - 2023-08-09 18 19- 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](https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1671540180) for details. 20 21## [0.2.11] - 2023-08-06 22 23- Add support for `#[project(!Unpin)]`. This is equivalent to pin-project's [!Unpin](https://docs.rs/pin-project/latest/pin_project/attr.pin_project.html#unpin) option. ([#76](https://github.com/taiki-e/pin-project-lite/pull/76), thanks @matheus-consoli) 24 25## [0.2.10] - 2023-07-02 26 27- Inline project methods. ([#74](https://github.com/taiki-e/pin-project-lite/pull/74), thanks @EFanZh) 28 29## [0.2.9] - 2022-04-26 30 31- Improve compile time of `pin_project!` calls. ([#71](https://github.com/taiki-e/pin-project-lite/pull/71), thanks @nnethercote) 32 33## [0.2.8] - 2021-12-31 34 35- Fix handling of trailing commas in `PinnedDrop` impl. ([#64](https://github.com/taiki-e/pin-project-lite/pull/64), thanks @Michael-J-Ward) 36 37## [0.2.7] - 2021-06-26 38 39- [Support custom Drop implementation.](https://github.com/taiki-e/pin-project-lite/pull/25) See [#25](https://github.com/taiki-e/pin-project-lite/pull/25) for details. 40 41## [0.2.6] - 2021-03-04 42 43- Support item attributes in any order. ([#57](https://github.com/taiki-e/pin-project-lite/pull/57), thanks @SabrinaJewson) 44 45## [0.2.5] - 2021-03-02 46 47- [Prepare for removal of `safe_packed_borrows` lint.](https://github.com/taiki-e/pin-project-lite/pull/55) See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 48 49## [0.2.4] - 2021-01-11 50 51**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 52 53- Add `project_replace`. ([#43](https://github.com/taiki-e/pin-project-lite/pull/43), thanks @Marwes) 54 55## [0.2.3] - 2021-01-09 56 57**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 58 59- [Suppress `clippy::unknown_clippy_lints` lint in generated code.](https://github.com/taiki-e/pin-project-lite/pull/47) 60 61## [0.2.2] - 2021-01-09 62 63**Note:** This release has been yanked.** See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 64 65- [Suppress `clippy::ref_option_ref` lint in generated code.](https://github.com/taiki-e/pin-project-lite/pull/45) 66 67## [0.2.1] - 2021-01-05 68 69**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 70 71- Exclude unneeded files from crates.io. 72 73## [0.2.0] - 2020-11-13 74 75**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 76 77- [`pin_project!` macro now supports enums.](https://github.com/taiki-e/pin-project-lite/pull/28) 78 79 To use `pin_project!` on enums, you need to name the projection type returned from the method. 80 81 ```rust 82 use pin_project_lite::pin_project; 83 use std::pin::Pin; 84 85 pin_project! { 86 #[project = EnumProj] 87 enum Enum<T, U> { 88 Variant { #[pin] pinned: T, unpinned: U }, 89 } 90 } 91 92 impl<T, U> Enum<T, U> { 93 fn method(self: Pin<&mut Self>) { 94 match self.project() { 95 EnumProj::Variant { pinned, unpinned } => { 96 let _: Pin<&mut T> = pinned; 97 let _: &mut U = unpinned; 98 } 99 } 100 } 101 } 102 ``` 103 104- [Support naming the projection types.](https://github.com/taiki-e/pin-project-lite/pull/28) 105 106 By passing an attribute with the same name as the method, you can name the projection type returned from the method: 107 108 ```rust 109 use pin_project_lite::pin_project; 110 use std::pin::Pin; 111 112 pin_project! { 113 #[project = StructProj] 114 struct Struct<T> { 115 #[pin] 116 field: T, 117 } 118 } 119 120 fn func<T>(x: Pin<&mut Struct<T>>) { 121 let StructProj { field } = x.project(); 122 let _: Pin<&mut T> = field; 123 } 124 ``` 125 126## [0.1.12] - 2021-03-02 127 128- [Prepare for removal of `safe_packed_borrows` lint.](https://github.com/taiki-e/pin-project-lite/pull/55) See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 129 130## [0.1.11] - 2020-10-20 131 132**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 133 134- Suppress `clippy::redundant_pub_crate` lint in generated code. 135 136- Documentation improvements. 137 138## [0.1.10] - 2020-10-01 139 140**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 141 142- Suppress `drop_bounds` lint, which will be added to rustc in the future. See [taiki-e/pin-project#272](https://github.com/taiki-e/pin-project/issues/272) for more details. 143 144## [0.1.9] - 2020-09-29 145 146**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 147 148- [Fix trailing comma support in generics.](https://github.com/taiki-e/pin-project-lite/pull/32) 149 150## [0.1.8] - 2020-09-26 151 152**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 153 154- [Fix compatibility of generated code with `forbid(future_incompatible)`.](https://github.com/taiki-e/pin-project-lite/pull/30) 155 156 Note: This does not guarantee compatibility with `forbid(future_incompatible)` in the future. 157 If rustc adds a new lint, we may not be able to keep this. 158 159## [0.1.7] - 2020-06-04 160 161**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 162 163- [Support `?Sized` bounds in where clauses.](https://github.com/taiki-e/pin-project-lite/pull/22) 164 165- [Fix lifetime inference error when an associated type is used in fields.](https://github.com/taiki-e/pin-project-lite/pull/20) 166 167- Suppress `clippy::used_underscore_binding` lint in generated code. 168 169- Documentation improvements. 170 171## [0.1.6] - 2020-05-31 172 173**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 174 175- [Support lifetime bounds in where clauses.](https://github.com/taiki-e/pin-project-lite/pull/18) 176 177- Documentation improvements. 178 179## [0.1.5] - 2020-05-07 180 181**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 182 183- [Support overwriting the name of `core` crate.](https://github.com/taiki-e/pin-project-lite/pull/14) 184 185## [0.1.4] - 2020-01-20 186 187**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 188 189- [Support ?Sized bounds in generic parameters.](https://github.com/taiki-e/pin-project-lite/pull/9) 190 191## [0.1.3] - 2020-01-20 192 193**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 194 195- [Support lifetime bounds in generic parameters.](https://github.com/taiki-e/pin-project-lite/pull/7) 196 197## [0.1.2] - 2020-01-05 198 199**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 200 201- Support recognizing default generic parameters. ([#6](https://github.com/taiki-e/pin-project-lite/pull/6), thanks @kennytm) 202 203## [0.1.1] - 2019-11-15 204 205**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 206 207- [`pin_project!` macro now determines the visibility of the projection type/method is based on the original type.](https://github.com/taiki-e/pin-project-lite/pull/5) 208 209## [0.1.0] - 2019-10-22 210 211**Note:** This release has been yanked. See [#55](https://github.com/taiki-e/pin-project-lite/pull/55) for details. 212 213Initial release 214 215[Unreleased]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.13...HEAD 216[0.2.13]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.12...v0.2.13 217[0.2.12]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.11...v0.2.12 218[0.2.11]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.10...v0.2.11 219[0.2.10]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.9...v0.2.10 220[0.2.9]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.8...v0.2.9 221[0.2.8]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.7...v0.2.8 222[0.2.7]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.6...v0.2.7 223[0.2.6]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.5...v0.2.6 224[0.2.5]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.4...v0.2.5 225[0.2.4]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.3...v0.2.4 226[0.2.3]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.2...v0.2.3 227[0.2.2]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.1...v0.2.2 228[0.2.1]: https://github.com/taiki-e/pin-project-lite/compare/v0.2.0...v0.2.1 229[0.2.0]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.11...v0.2.0 230[0.1.12]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.11...v0.1.12 231[0.1.11]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.10...v0.1.11 232[0.1.10]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.9...v0.1.10 233[0.1.9]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.8...v0.1.9 234[0.1.8]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.7...v0.1.8 235[0.1.7]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.6...v0.1.7 236[0.1.6]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.5...v0.1.6 237[0.1.5]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.4...v0.1.5 238[0.1.4]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.3...v0.1.4 239[0.1.3]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.2...v0.1.3 240[0.1.2]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.1...v0.1.2 241[0.1.1]: https://github.com/taiki-e/pin-project-lite/compare/v0.1.0...v0.1.1 242[0.1.0]: https://github.com/taiki-e/pin-project-lite/releases/tag/v0.1.0 243