Debian Codegraph @

third_party/rust/pin-project/CHANGELOG.md

raw
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 <!--
8 Note: 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 ## [1.1.0] - 2023-05-13
14
15 - Update `syn` dependency to 2. This increase the minimum supported Rust version from Rust 1.37 to Rust 1.56. ([#352](https://github.com/taiki-e/pin-project/pull/352), [#354](https://github.com/taiki-e/pin-project/pull/354), thanks @maurer and @daxpedda)
16
17 ## [1.0.12] - 2022-08-15
18
19 - Suppress `unused_tuple_struct_fields` lint in generated code.
20
21 ## [1.0.11] - 2022-07-02
22
23 - [Suppress `dead_code` lint in generated code.](https://github.com/taiki-e/pin-project/pull/346)
24
25 ## [1.0.10] - 2021-12-31
26
27 - Revert the increase of the minimal version of `syn` that was done in 1.0.9.
28
29 ## [1.0.9] - 2021-12-26
30
31 - [Prevent abuse of private module.](https://github.com/taiki-e/pin-project/pull/336)
32
33 - Update minimal version of `syn` to 1.0.84.
34
35 ## [1.0.8] - 2021-07-21
36
37 - [Suppress `clippy::use_self` and `clippy::type_repetition_in_bounds` lints in generated code.](https://github.com/taiki-e/pin-project/pull/331)
38
39 ## [1.0.7] - 2021-04-16
40
41 - [Fix compile error when using `self::` as prefix of path inside `#[pinned_drop]` impl.](https://github.com/taiki-e/pin-project/pull/326)
42
43 ## [1.0.6] - 2021-03-25
44
45 - [Suppress `clippy::semicolon_if_nothing_returned` lint in generated code.](https://github.com/taiki-e/pin-project/pull/318)
46
47 ## [1.0.5] - 2021-02-03
48
49 - [Suppress `deprecated` lint in generated code.](https://github.com/taiki-e/pin-project/pull/313)
50
51 ## [1.0.4] - 2021-01-09
52
53 - [Suppress `clippy::ref_option_ref` lint in generated code.](https://github.com/taiki-e/pin-project/pull/308)
54
55 ## [1.0.3] - 2021-01-05
56
57 - Exclude unneeded files from crates.io.
58
59 ## [1.0.2] - 2020-11-18
60
61 - [Suppress `clippy::unknown_clippy_lints` lint in generated code.](https://github.com/taiki-e/pin-project/pull/303)
62
63 ## [1.0.1] - 2020-10-15
64
65 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/commit/ddcd88079ba2d82857c365f2a3543ad146ade54c).
66
67 - [Fix warnings when `#[pin_project]` attribute used within `macro_rules!` macros.](https://github.com/taiki-e/pin-project/pull/298)
68
69 ## [1.0.0] - 2020-10-13
70
71 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/commit/ddcd88079ba2d82857c365f2a3543ad146ade54c).
72
73 - [Remove deprecated `#[project]`, `#[project_ref]`, and `#[project_replace]` attributes.](https://github.com/taiki-e/pin-project/pull/265)
74
75 Name the projected type by passing an argument with the same name as the method to the `#[pin_project]` attribute instead:
76
77 ```diff
78 - #[pin_project]
79 + #[pin_project(project = EnumProj)]
80 enum Enum<T> {
81 Variant(#[pin] T),
82 }
83
84 - #[project]
85 fn func<T>(x: Pin<&mut Enum<T>>) {
86 - #[project]
87 match x.project() {
88 - Enum::Variant(_) => { /* ... */ }
89 + EnumProj::Variant(_) => { /* ... */ }
90 }
91 }
92 ```
93
94 - [Remove deprecated `Replace` argument from `#[pin_project]` attribute.](https://github.com/taiki-e/pin-project/pull/266) Use `project_replace` argument instead.
95
96 - [Optimize code generation when used on enums.](https://github.com/taiki-e/pin-project/pull/270)
97
98 - [Raise the minimum supported Rust version of this crate from Rust 1.34 to Rust 1.37.](https://github.com/taiki-e/pin-project/pull/292)
99
100 - Suppress `explicit_outlives_requirements`, `box_pointers`, `clippy::large_enum_variant`, `clippy::pattern_type_mismatch`, `clippy::implicit_return`, and `clippy::redundant_pub_crate` lints in generated code. ([#276](https://github.com/taiki-e/pin-project/pull/276), [#277](https://github.com/taiki-e/pin-project/pull/277), [#284](https://github.com/taiki-e/pin-project/pull/284))
101
102 - Diagnostic improvements.
103
104 Changes since the 1.0.0-alpha.1 release:
105
106 - [Fix drop order of pinned fields in `project_replace`.](https://github.com/taiki-e/pin-project/pull/287)
107
108 - Update minimal version of `syn` to 1.0.44.
109
110 ## [1.0.0-alpha.1] - 2020-09-22
111
112 - [Remove deprecated `#[project]`, `#[project_ref]`, and `#[project_replace]` attributes.](https://github.com/taiki-e/pin-project/pull/265)
113
114 Name the projected type by passing an argument with the same name as the method to the `#[pin_project]` attribute instead:
115
116 ```diff
117 - #[pin_project]
118 + #[pin_project(project = EnumProj)]
119 enum Enum<T> {
120 Variant(#[pin] T),
121 }
122
123 - #[project]
124 fn func<T>(x: Pin<&mut Enum<T>>) {
125 - #[project]
126 match x.project() {
127 - Enum::Variant(_) => { /* ... */ }
128 + EnumProj::Variant(_) => { /* ... */ }
129 }
130 }
131 ```
132
133 - [Remove deprecated `Replace` argument from `#[pin_project]` attribute.](https://github.com/taiki-e/pin-project/pull/266) Use `project_replace` argument instead.
134
135 - [Optimize code generation when used on enums.](https://github.com/taiki-e/pin-project/pull/270)
136
137 - Suppress `explicit_outlives_requirements`, `box_pointers`, `clippy::large_enum_variant`, `clippy::pattern_type_mismatch`, and `clippy::implicit_return` lints in generated code. ([#276](https://github.com/taiki-e/pin-project/pull/276), [#277](https://github.com/taiki-e/pin-project/pull/277))
138
139 - Diagnostic improvements.
140
141 See also [tracking issue for 1.0 release](https://github.com/taiki-e/pin-project/issues/264).
142
143 ## [0.4.30] - 2022-07-02
144
145 - [Suppress `dead_code` lint in generated code.](https://github.com/taiki-e/pin-project/pull/347)
146
147 ## [0.4.29] - 2021-12-26
148
149 - [Fix compile error with `syn` 1.0.84 and later.](https://github.com/taiki-e/pin-project/pull/335)
150
151 ## [0.4.28] - 2021-03-28
152
153 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
154
155 - [Fix `unused_must_use` warning on unused borrows, which will be added to rustc in the future.](https://github.com/taiki-e/pin-project/pull/322) See [#322](https://github.com/taiki-e/pin-project/pull/322) for more details.
156
157 (Note: 1.0 does not have this problem.)
158
159 ## [0.4.27] - 2020-10-11
160
161 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
162
163 - Update minimal version of `syn` to 1.0.44.
164
165 ## [0.4.26] - 2020-10-04
166
167 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
168
169 - [Fix drop order of pinned fields in `project_replace`.](https://github.com/taiki-e/pin-project/pull/287)
170
171 ## [0.4.25] - 2020-10-01
172
173 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
174
175 - [Suppress `drop_bounds` lint, which will be added to rustc in the future.](https://github.com/taiki-e/pin-project/pull/273) See [#272](https://github.com/taiki-e/pin-project/issues/272) for more details.
176
177 (Note: 1.0.0-alpha.1 already contains this change.)
178
179 ## [0.4.24] - 2020-09-26
180
181 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
182
183 - [Fix compatibility of generated code with `forbid(future_incompatible)`.](https://github.com/taiki-e/pin-project/pull/282)
184
185 Note: This does not guarantee compatibility with `forbid(future_incompatible)` in the future.
186 If rustc adds a new lint, we may not be able to keep this.
187
188 ## [0.4.23] - 2020-07-27
189
190 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
191
192 - [Fix compile error with `?Sized` type parameters.](https://github.com/taiki-e/pin-project/pull/263)
193
194 ## [0.4.22] - 2020-06-14
195
196 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
197
198 - Documentation improvements.
199
200 ## [0.4.21] - 2020-06-13
201
202 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
203
204 - [Deprecated `#[project]`, `#[project_ref]`, and `#[project_replace]` attributes due to some unfixable limitations.](https://github.com/taiki-e/pin-project/pull/244)
205
206 Consider naming the projected type by passing an argument with the same name as the method to the `#[pin_project]` attribute instead.
207
208 ```rust
209 #[pin_project(project = EnumProj)]
210 enum Enum<T> {
211 Variant(#[pin] T),
212 }
213
214 fn func<T>(x: Pin<&mut Enum<T>>) {
215 match x.project() {
216 EnumProj::Variant(y) => {
217 let _: Pin<&mut T> = y;
218 }
219 }
220 }
221 ```
222
223 See [#225](https://github.com/taiki-e/pin-project/pull/225) for more details.
224
225 - [Support `Self` in fields and generics in type definitions.](https://github.com/taiki-e/pin-project/pull/245)
226
227 - [Fix errors involving *"`self` value is a keyword only available in methods with `self` parameter"* in apparently correct code.](https://github.com/taiki-e/pin-project/pull/250)
228
229 - Diagnostic improvements.
230
231 ## [0.4.20] - 2020-06-07
232
233 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
234
235 - [You can now use `project_replace` argument without Replace argument.](https://github.com/taiki-e/pin-project/pull/243)
236 This used to require you to specify both.
237
238 ```diff
239 - #[pin_project(Replace, project_replace = EnumProjOwn)]
240 + #[pin_project(project_replace = EnumProjOwn)]
241 enum Enum<T> {
242 Variant(#[pin] T)
243 }
244 ```
245
246 - [Make `project_replace` argument an alias for `Replace` argument so that it can be used without a value.](https://github.com/taiki-e/pin-project/pull/243)
247
248 ```rust
249 #[pin_project(project_replace)]
250 enum Enum<T> {
251 Variant(#[pin] T)
252 }
253 ```
254
255 *The `Replace` argument will be deprecated in the future.*
256
257 - [Suppress `unreachable_pub` lint in generated code.](https://github.com/taiki-e/pin-project/pull/240)
258
259 ## [0.4.19] - 2020-06-04
260
261 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
262
263 - [Suppress `unused_results` lint in generated code.](https://github.com/taiki-e/pin-project/pull/239)
264
265 ## [0.4.18] - 2020-06-04
266
267 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
268
269 - [Support `Self` in more syntax positions inside `#[pinned_drop]` impl.](https://github.com/taiki-e/pin-project/pull/230)
270
271 - [Suppress `clippy::type_repetition_in_bounds` and `clippy::used_underscore_binding` lints in generated code.](https://github.com/taiki-e/pin-project/pull/233)
272
273 - Documentation improvements.
274
275 - Diagnostic improvements.
276
277 ## [0.4.17] - 2020-05-18
278
279 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
280
281 - [Support naming the projection types.](https://github.com/taiki-e/pin-project/pull/202)
282
283 By passing an argument with the same name as the method to the attribute, you can name the projection type returned from the method:
284
285 ```rust
286 #[pin_project(project = EnumProj)]
287 enum Enum<T> {
288 Variant(#[pin] T),
289 }
290
291 fn func<T>(x: Pin<&mut Enum<T>>) {
292 match x.project() {
293 EnumProj::Variant(y) => {
294 let _: Pin<&mut T> = y;
295 }
296 }
297 }
298 ```
299
300 ## [0.4.16] - 2020-05-11
301
302 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
303
304 - [Fix an issue that users can call internal function generated by `#[pinned_drop]`.](https://github.com/taiki-e/pin-project/pull/223)
305
306 ## [0.4.15] - 2020-05-10
307
308 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
309
310 - [`#[project]` attribute can now handle all `project*` attributes in that scope with one wrapper attribute.](https://github.com/taiki-e/pin-project/pull/220)
311
312 ## [0.4.14] - 2020-05-09
313
314 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
315
316 - [Add `!Unpin` option to `#[pin_project]` attribute for guarantee the type is `!Unpin`.](https://github.com/taiki-e/pin-project/pull/219)
317
318 ```rust
319 #[pin_project(!Unpin)]
320 struct Struct<T, U> {
321 field: T,
322 }
323 ```
324
325 This is equivalent to use `#[pin]` attribute for `PhantomPinned` field.
326
327 ```rust
328 #[pin_project]
329 struct Struct<T, U> {
330 field: T,
331 #[pin] // Note that using `PhantomPinned` without `#[pin]` attribute has no effect.
332 _pin: PhantomPinned,
333 }
334 ```
335
336 *[Note: This raises the minimum supported Rust version of this crate from Rust 1.33 to Rust 1.34.](https://github.com/taiki-e/pin-project/pull/219#pullrequestreview-408644187)*
337
338 - [Fix an issue where duplicate `#[project]` attributes were ignored.](https://github.com/taiki-e/pin-project/pull/218)
339
340 - [Suppress `single_use_lifetimes` lint in generated code.](https://github.com/taiki-e/pin-project/pull/217)
341
342 - [Support overlapping lifetime names in HRTB.](https://github.com/taiki-e/pin-project/pull/217)
343
344 - [Hide generated items from --document-private-items.](https://github.com/taiki-e/pin-project/pull/211) See [#211](https://github.com/taiki-e/pin-project/pull/211) for details.
345
346 - Documentation improvements.
347
348 ## [0.4.13] - 2020-05-07
349
350 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
351
352 - [Fix a regression in 0.4.11.](https://github.com/taiki-e/pin-project/pull/207)
353
354 Changes from [0.4.10](https://github.com/taiki-e/pin-project/releases/tag/v0.4.10) and [0.4.12](https://github.com/taiki-e/pin-project/releases/tag/v0.4.12):
355
356 - [Fix an issue that `#[project]` on non-statement expression does not work without unstable features.](https://github.com/taiki-e/pin-project/pull/197)
357
358 - [Support overwriting the name of core crate.](https://github.com/taiki-e/pin-project/pull/199)
359
360 - [Suppress `clippy::needless_pass_by_value` lint in generated code of `#[pinned_drop]`.](https://github.com/taiki-e/pin-project/pull/200)
361
362 - Documentation improvements.
363
364 - Diagnostic improvements.
365
366 ## [0.4.12] - 2020-05-07
367
368 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
369
370 - A release to avoid [a regression in 0.4.11](https://github.com/taiki-e/pin-project/issues/206). No code changes from [0.4.10](https://github.com/taiki-e/pin-project/releases/tag/v0.4.10).
371
372 ## [0.4.11] - 2020-05-07
373
374 **Note:** This release has been yanked. See [#206](https://github.com/taiki-e/pin-project/issues/206) for details.
375
376 - [Fix an issue that `#[project]` on non-statement expression does not work without unstable features.](https://github.com/taiki-e/pin-project/pull/197)
377
378 - [Support overwriting the name of core crate.](https://github.com/taiki-e/pin-project/pull/199)
379
380 - [Suppress `clippy::needless_pass_by_value` lint in generated code of `#[pinned_drop]`.](https://github.com/taiki-e/pin-project/pull/200)
381
382 - Documentation improvements.
383
384 - Diagnostic improvements.
385
386 ## [0.4.10] - 2020-05-04
387
388 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
389
390 - [Add `project_replace` method and `#[project_replace]` attribute.](https://github.com/taiki-e/pin-project/pull/194)
391 `project_replace` method is optional and can be enabled by passing the `Replace` argument to `#[pin_project]` attribute.
392 See [the documentation](https://docs.rs/pin-project/0.4/pin_project/attr.pin_project.html#project_replace) for more details.
393
394 - [Support `Self` and `self` in more syntax positions inside `#[pinned_drop]` impl.](https://github.com/taiki-e/pin-project/pull/190)
395
396 - [Hide all generated items except for projected types from calling code.](https://github.com/taiki-e/pin-project/pull/192) See [#192](https://github.com/taiki-e/pin-project/pull/192) for details.
397
398 ## [0.4.9] - 2020-04-14
399
400 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
401
402 - [Fix lifetime inference error when associated types are used in fields.](https://github.com/taiki-e/pin-project/pull/188)
403
404 - [Fix compile error with tuple structs with `where` clauses.](https://github.com/taiki-e/pin-project/pull/186)
405
406 - [`#[project]` attribute can now be used for `if let` expressions.](https://github.com/taiki-e/pin-project/pull/181)
407
408 ## [0.4.8] - 2020-01-27
409
410 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
411
412 - [Ensure that users cannot implement `PinnedDrop` without proper attribute argument.](https://github.com/taiki-e/pin-project/pull/180)
413
414 - [Fix use of `Self` in expression position inside `#[pinned_drop]` impl.](https://github.com/taiki-e/pin-project/pull/177)
415
416 ## [0.4.7] - 2020-01-20
417
418 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
419
420 - [Fix support for lifetime bounds.](https://github.com/taiki-e/pin-project/pull/176)
421
422 ## [0.4.6] - 2019-11-20
423
424 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
425
426 - [Fix compile error when there is `Self` in the where clause.](https://github.com/taiki-e/pin-project/pull/169)
427
428 ## [0.4.5] - 2019-10-21
429
430 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
431
432 - [Fix compile error with `dyn` types.](https://github.com/taiki-e/pin-project/pull/158)
433
434 ## [0.4.4] - 2019-10-17
435
436 **Note:** This release has been yanked because it [failed to compile with syn 1.0.84 and later](https://github.com/taiki-e/pin-project/pull/335).
437
438 - [Fix an issue where `PinnedDrop` implementations can call unsafe code without an unsafe block.](https://github.com/taiki-e/pin-project/pull/149)
439
440 ## [0.4.3] - 2019-10-15
441
442 **Note:** This release has been yanked. See [#148](https://github.com/taiki-e/pin-project/pull/148) for details.
443
444 - [`#[pin_project]` can now interoperate with `#[cfg_attr()]`.](https://github.com/taiki-e/pin-project/pull/135)
445
446 - [`#[pin_project]` can now interoperate with `#[cfg()]` on tuple structs and tuple variants.](https://github.com/taiki-e/pin-project/pull/135)
447
448 - [Fix support for DSTs(Dynamically Sized Types) on `#[pin_project(UnsafeUnpin)]`](https://github.com/taiki-e/pin-project/pull/120)
449
450 - Diagnostic improvements.
451
452 ## [0.4.2] - 2019-09-29
453
454 **Note:** This release has been yanked. See [#148](https://github.com/taiki-e/pin-project/pull/148) for details.
455
456 - [Fix support for DSTs(Dynamically Sized Types).](https://github.com/taiki-e/pin-project/pull/113)
457
458 ## [0.4.1] - 2019-09-26
459
460 **Note:** This release has been yanked. See [#148](https://github.com/taiki-e/pin-project/pull/148) for details.
461
462 - [Fix an issue that caused an error when using `#[pin_project]` on a type that has `#[pin]` + `!Unpin` field with no generics or lifetime.](https://github.com/taiki-e/pin-project/pull/111)
463
464 ## [0.4.0] - 2019-09-25
465
466 **Note:** This release has been yanked. See [#148](https://github.com/taiki-e/pin-project/pull/148) for details.
467
468 - [**Pin projection has become a safe operation.**](https://github.com/taiki-e/pin-project/pull/18) In the absence of other unsafe code that you write, it is impossible to cause undefined behavior.
469
470 - `#[unsafe_project]` attribute has been replaced with `#[pin_project]` attribute. ([#18](https://github.com/taiki-e/pin-project/pull/18), [#33](https://github.com/taiki-e/pin-project/pull/33))
471
472 - [The `Unpin` argument has been removed - an `Unpin` impl is now generated by default.](https://github.com/taiki-e/pin-project/pull/18)
473
474 - Drop impls must be specified with `#[pinned_drop]` instead of via a normal `Drop` impl. ([#18](https://github.com/taiki-e/pin-project/pull/18), [#33](https://github.com/taiki-e/pin-project/pull/33), [#86](https://github.com/taiki-e/pin-project/pull/86))
475
476 - [`Unpin` impls must be specified with an impl of `UnsafeUnpin`, instead of implementing the normal `Unpin` trait.](https://github.com/taiki-e/pin-project/pull/18)
477
478 - [`#[pin_project]` attribute now determines the visibility of the projection type/method is based on the original type.](https://github.com/taiki-e/pin-project/pull/96)
479
480 - [`#[pin_project]` can now be used for public type with private field types.](https://github.com/taiki-e/pin-project/pull/53)
481
482 - [`#[pin_project]` can now interoperate with `#[cfg()]`.](https://github.com/taiki-e/pin-project/pull/77)
483
484 - [Add `project_ref` method to `#[pin_project]` types.](https://github.com/taiki-e/pin-project/pull/93)
485
486 - [Add `#[project_ref]` attribute.](https://github.com/taiki-e/pin-project/pull/93)
487
488 - [Remove "project_attr" feature and always enable `#[project]` attribute.](https://github.com/taiki-e/pin-project/pull/94)
489
490 - [`#[project]` attribute can now be used for `impl` blocks.](https://github.com/taiki-e/pin-project/pull/46)
491
492 - [`#[project]` attribute can now be used for `use` statements.](https://github.com/taiki-e/pin-project/pull/85)
493
494 - [`#[project]` attribute now supports `match` expressions at the position of the initializer expression of `let` expressions.](https://github.com/taiki-e/pin-project/pull/51)
495
496 Changes since the 0.4.0-beta.1 release:
497
498 - [Fix an issue that caused an error when using `#[pin_project(UnsafeUnpin)]` and not providing a manual `UnsafeUnpin` implementation on a type with no generics or lifetime.](https://github.com/taiki-e/pin-project/pull/107)
499
500 ## [0.4.0-beta.1] - 2019-09-21
501
502 - [Change the argument type of project method back to `self: Pin<&mut Self>`.](https://github.com/taiki-e/pin-project/pull/90)
503
504 - [Remove "project_attr" feature and always enable `#[project]` attribute.](https://github.com/taiki-e/pin-project/pull/94)
505
506 - [Remove "renamed" feature.](https://github.com/taiki-e/pin-project/pull/100)
507
508 - [`#[project]` attribute can now be used for `use` statements.](https://github.com/taiki-e/pin-project/pull/85)
509
510 - [Add `project_ref` method and `#[project_ref]` attribute.](https://github.com/taiki-e/pin-project/pull/93)
511
512 - [`#[pin_project]` attribute now determines the visibility of the projection type/method is based on the original type.](https://github.com/taiki-e/pin-project/pull/96)
513
514 ## [0.4.0-alpha.11] - 2019-09-11
515
516 - [Change #[pinned_drop] to trait implementation.](https://github.com/taiki-e/pin-project/pull/86)
517
518 ```rust
519 #[pinned_drop]
520 impl<T> PinnedDrop for Foo<'_, T> {
521 fn drop(mut self: Pin<&mut Self>) {
522 **self.project().was_dropped = true;
523 }
524 }
525 ```
526
527 - Add some examples and generated code.
528
529 - Diagnostic improvements.
530
531 ## [0.4.0-alpha.10] - 2019-09-07
532
533 - [`#[pin_project]` can now interoperate with `#[cfg()]`.](https://github.com/taiki-e/pin-project/pull/77)
534
535 - Documentation improvements.
536
537 ## [0.4.0-alpha.9] - 2019-09-05
538
539 - [Add `project_into` method to `#[pin_project]` types](https://github.com/taiki-e/pin-project/pull/69). This can be useful when returning a pin projection from a method.
540
541 ```rust
542 fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T> {
543 self.project_into().pinned
544 }
545 ```
546
547 - [Prevent `UnpinStruct` from appearing in the document by default.](https://github.com/taiki-e/pin-project/pull/71) See [#71](https://github.com/taiki-e/pin-project/pull/71) for more details.
548
549 ## [0.4.0-alpha.8] - 2019-09-03
550
551 - [Improve document of generated code.](https://github.com/taiki-e/pin-project/pull/62). Also added an option to control the document of generated code. See [#62](https://github.com/taiki-e/pin-project/pull/62) for more details.
552
553 - [Diagnostic improvements.](https://github.com/taiki-e/pin-project/pull/61)
554
555 ## [0.4.0-alpha.7] - 2019-09-02
556
557 - [Suppress `dead_code` lint in generated types.](https://github.com/taiki-e/pin-project/pull/57)
558
559 ## [0.4.0-alpha.6] - 2019-09-01
560
561 - [Allow using `#[pin_project]` type with private field types](https://github.com/taiki-e/pin-project/pull/53)
562
563 ## [0.4.0-alpha.5] - 2019-08-24
564
565 - [`#[project]` attribute now supports `match` expressions at the position of the initializer expression of `let` expressions.](https://github.com/taiki-e/pin-project/pull/51)
566
567 ## [0.4.0-alpha.4] - 2019-08-23
568
569 - Suppress `clippy::drop_bounds` lint in generated code.
570
571 ## [0.4.0-alpha.3] - 2019-08-23
572
573 - [Change `project` method generated by `#[pin_project]` attribute to take an `&mut Pin<&mut Self>` argument.](https://github.com/taiki-e/pin-project/pull/47)
574
575 - [`#[project]` attribute can now be used for impl blocks.](https://github.com/taiki-e/pin-project/pull/46)
576
577 - [`#[pin_project]` attribute can now detect that the type used does not have its own drop implementation without actually implementing drop.](https://github.com/taiki-e/pin-project/pull/48) This removed some restrictions.
578
579 ## [0.4.0-alpha.2] - 2019-08-13
580
581 - Update `proc-macro2`, `syn`, and `quote` to 1.0.
582
583 ## [0.4.0-alpha.1] - 2019-08-11
584
585 - **Pin projection has become a safe operation.**
586
587 - `#[unsafe_project]` has been replaced with `#[pin_project]`.
588
589 - The `Unpin` argument has been removed - an `Unpin` impl is now generated by default.
590
591 - Drop impls must be specified with `#[pinned_drop]` instead of via a normal `Drop` impl.
592
593 - `Unpin` impls must be specified with an impl of `UnsafeUnpin`, instead of implementing the normal `Unpin` trait.
594
595 - Make `#[project]` attribute disabled by default.
596
597 See also [tracking issue for 0.4 release](https://github.com/taiki-e/pin-project/issues/21).
598
599 ## [0.3.5] - 2019-08-14
600
601 - Update `proc-macro2`, `syn`, and `quote` to 1.0.
602
603 ## [0.3.4] - 2019-07-21
604
605 - Diagnostic improvements.
606
607 ## [0.3.3] - 2019-07-15
608
609 **Note:** This release has been yanked. See [#16](https://github.com/taiki-e/pin-project/issues/16) for details.
610
611 - Diagnostic improvements.
612
613 ## [0.3.2] - 2019-03-30
614
615 - Avoid suffixes on tuple index.
616
617 ## [0.3.1] - 2019-03-02
618
619 - Documentation improvements.
620
621 - Update minimum `syn` version to 0.15.22.
622
623 ## [0.3.0] - 2019-02-20
624
625 - Remove `unsafe_fields` attribute.
626
627 - Remove `unsafe_variants` attribute.
628
629 ## [0.2.2] - 2019-02-20
630
631 - Fix a bug that generates incorrect code for the some structures with trait bounds on type generics.
632
633 ## [0.2.1] - 2019-02-20
634
635 - Fix a bug that generates incorrect code for the structures with where clause and associated type fields.
636
637 ## [0.2.0] - 2019-02-11
638
639 - Make `unsafe_fields` optional.
640
641 - Documentation improvements.
642
643 ## [0.1.8] - 2019-02-02
644
645 - Add the feature to create projected enums to `unsafe_project`.
646
647 - Add `project` attribute to support pattern matching.
648
649 ## [0.1.7] - 2019-01-19
650
651 - Fix documentation.
652
653 ## [0.1.6] - 2019-01-19
654
655 - `unsafe_fields` can now opt-out.
656
657 - Add `unsafe_variants` attribute. This attribute is available if pin-project is built with the "unsafe_variants" feature.
658
659 ## [0.1.5] - 2019-01-17
660
661 - Add support for tuple struct to `unsafe_project`.
662
663 ## [0.1.4] - 2019-01-12
664
665 - Add options for automatically implementing `Unpin` to both `unsafe_project` and `unsafe_fields`.
666
667 ## [0.1.3] - 2019-01-11
668
669 - Fix dependencies.
670
671 - Add `unsafe_fields` attribute.
672
673 ## [0.1.2] - 2019-01-09
674
675 - Documentation improvements.
676
677 ## [0.1.1] - 2019-01-08
678
679 - Rename from `unsafe_pin_project` to `unsafe_project`.
680
681 ## [0.1.0] - 2019-01-08
682
683 **Note:** This release has been yanked.
684
685 Initial release
686
687 [Unreleased]: https://github.com/taiki-e/pin-project/compare/v1.1.0...HEAD
688 [1.1.0]: https://github.com/taiki-e/pin-project/compare/v1.0.12...v1.1.0
689 [1.0.12]: https://github.com/taiki-e/pin-project/compare/v1.0.11...v1.0.12
690 [1.0.11]: https://github.com/taiki-e/pin-project/compare/v1.0.10...v1.0.11
691 [1.0.10]: https://github.com/taiki-e/pin-project/compare/v1.0.9...v1.0.10
692 [1.0.9]: https://github.com/taiki-e/pin-project/compare/v1.0.8...v1.0.9
693 [1.0.8]: https://github.com/taiki-e/pin-project/compare/v1.0.7...v1.0.8
694 [1.0.7]: https://github.com/taiki-e/pin-project/compare/v1.0.6...v1.0.7
695 [1.0.6]: https://github.com/taiki-e/pin-project/compare/v1.0.5...v1.0.6
696 [1.0.5]: https://github.com/taiki-e/pin-project/compare/v1.0.4...v1.0.5
697 [1.0.4]: https://github.com/taiki-e/pin-project/compare/v1.0.3...v1.0.4
698 [1.0.3]: https://github.com/taiki-e/pin-project/compare/v1.0.2...v1.0.3
699 [1.0.2]: https://github.com/taiki-e/pin-project/compare/v1.0.1...v1.0.2
700 [1.0.1]: https://github.com/taiki-e/pin-project/compare/v1.0.0...v1.0.1
701 [1.0.0]: https://github.com/taiki-e/pin-project/compare/v1.0.0-alpha.1...v1.0.0
702 [1.0.0-alpha.1]: https://github.com/taiki-e/pin-project/compare/v0.4.23...v1.0.0-alpha.1
703 [0.4.30]: https://github.com/taiki-e/pin-project/compare/v0.4.29...v0.4.30
704 [0.4.29]: https://github.com/taiki-e/pin-project/compare/v0.4.28...v0.4.29
705 [0.4.28]: https://github.com/taiki-e/pin-project/compare/v0.4.27...v0.4.28
706 [0.4.27]: https://github.com/taiki-e/pin-project/compare/v0.4.26...v0.4.27
707 [0.4.26]: https://github.com/taiki-e/pin-project/compare/v0.4.25...v0.4.26
708 [0.4.25]: https://github.com/taiki-e/pin-project/compare/v0.4.24...v0.4.25
709 [0.4.24]: https://github.com/taiki-e/pin-project/compare/v0.4.23...v0.4.24
710 [0.4.23]: https://github.com/taiki-e/pin-project/compare/v0.4.22...v0.4.23
711 [0.4.22]: https://github.com/taiki-e/pin-project/compare/v0.4.21...v0.4.22
712 [0.4.21]: https://github.com/taiki-e/pin-project/compare/v0.4.20...v0.4.21
713 [0.4.20]: https://github.com/taiki-e/pin-project/compare/v0.4.19...v0.4.20
714 [0.4.19]: https://github.com/taiki-e/pin-project/compare/v0.4.18...v0.4.19
715 [0.4.18]: https://github.com/taiki-e/pin-project/compare/v0.4.17...v0.4.18
716 [0.4.17]: https://github.com/taiki-e/pin-project/compare/v0.4.16...v0.4.17
717 [0.4.16]: https://github.com/taiki-e/pin-project/compare/v0.4.15...v0.4.16
718 [0.4.15]: https://github.com/taiki-e/pin-project/compare/v0.4.14...v0.4.15
719 [0.4.14]: https://github.com/taiki-e/pin-project/compare/v0.4.13...v0.4.14
720 [0.4.13]: https://github.com/taiki-e/pin-project/compare/v0.4.11...v0.4.13
721 [0.4.12]: https://github.com/taiki-e/pin-project/compare/v0.4.10...v0.4.12
722 [0.4.11]: https://github.com/taiki-e/pin-project/compare/v0.4.10...v0.4.11
723 [0.4.10]: https://github.com/taiki-e/pin-project/compare/v0.4.9...v0.4.10
724 [0.4.9]: https://github.com/taiki-e/pin-project/compare/v0.4.8...v0.4.9
725 [0.4.8]: https://github.com/taiki-e/pin-project/compare/v0.4.7...v0.4.8
726 [0.4.7]: https://github.com/taiki-e/pin-project/compare/v0.4.6...v0.4.7
727 [0.4.6]: https://github.com/taiki-e/pin-project/compare/v0.4.5...v0.4.6
728 [0.4.5]: https://github.com/taiki-e/pin-project/compare/v0.4.4...v0.4.5
729 [0.4.4]: https://github.com/taiki-e/pin-project/compare/v0.4.3...v0.4.4
730 [0.4.3]: https://github.com/taiki-e/pin-project/compare/v0.4.2...v0.4.3
731 [0.4.2]: https://github.com/taiki-e/pin-project/compare/v0.4.1...v0.4.2
732 [0.4.1]: https://github.com/taiki-e/pin-project/compare/v0.4.0...v0.4.1
733 [0.4.0]: https://github.com/taiki-e/pin-project/compare/v0.4.0-beta.1...v0.4.0
734 [0.4.0-beta.1]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.11...v0.4.0-beta.1
735 [0.4.0-alpha.11]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.10...v0.4.0-alpha.11
736 [0.4.0-alpha.10]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.9...v0.4.0-alpha.10
737 [0.4.0-alpha.9]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.8...v0.4.0-alpha.9
738 [0.4.0-alpha.8]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.7...v0.4.0-alpha.8
739 [0.4.0-alpha.7]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.6...v0.4.0-alpha.7
740 [0.4.0-alpha.6]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.5...v0.4.0-alpha.6
741 [0.4.0-alpha.5]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.4...v0.4.0-alpha.5
742 [0.4.0-alpha.4]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.3...v0.4.0-alpha.4
743 [0.4.0-alpha.3]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.2...v0.4.0-alpha.3
744 [0.4.0-alpha.2]: https://github.com/taiki-e/pin-project/compare/v0.4.0-alpha.1...v0.4.0-alpha.2
745 [0.4.0-alpha.1]: https://github.com/taiki-e/pin-project/compare/v0.3.5...v0.4.0-alpha.1
746 [0.3.5]: https://github.com/taiki-e/pin-project/compare/v0.3.4...v0.3.5
747 [0.3.4]: https://github.com/taiki-e/pin-project/compare/v0.3.3...v0.3.4
748 [0.3.3]: https://github.com/taiki-e/pin-project/compare/v0.3.2...v0.3.3
749 [0.3.2]: https://github.com/taiki-e/pin-project/compare/v0.3.1...v0.3.2
750 [0.3.1]: https://github.com/taiki-e/pin-project/compare/v0.3.0...v0.3.1
751 [0.3.0]: https://github.com/taiki-e/pin-project/compare/v0.2.2...v0.3.0
752 [0.2.2]: https://github.com/taiki-e/pin-project/compare/v0.2.1...v0.2.2
753 [0.2.1]: https://github.com/taiki-e/pin-project/compare/v0.2.0...v0.2.1
754 [0.2.0]: https://github.com/taiki-e/pin-project/compare/v0.1.8...v0.2.0
755 [0.1.8]: https://github.com/taiki-e/pin-project/compare/v0.1.7...v0.1.8
756 [0.1.7]: https://github.com/taiki-e/pin-project/compare/v0.1.6...v0.1.7
757 [0.1.6]: https://github.com/taiki-e/pin-project/compare/v0.1.5...v0.1.6
758 [0.1.5]: https://github.com/taiki-e/pin-project/compare/v0.1.4...v0.1.5
759 [0.1.4]: https://github.com/taiki-e/pin-project/compare/v0.1.3...v0.1.4
760 [0.1.3]: https://github.com/taiki-e/pin-project/compare/v0.1.2...v0.1.3
761 [0.1.2]: https://github.com/taiki-e/pin-project/compare/v0.1.1...v0.1.2
762 [0.1.1]: https://github.com/taiki-e/pin-project/compare/v0.1.0...v0.1.1
763 [0.1.0]: https://github.com/taiki-e/pin-project/releases/tag/v0.1.0