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