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