Skip to content

Commit db49f06

Browse files
committed
Release 0.4.0
1 parent 816e3f0 commit db49f06

File tree

6 files changed

+57
-15
lines changed

6 files changed

+57
-15
lines changed

CHANGELOG.md

+44-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# Unreleased
22

3+
# 0.4.0 - 2019-09-25
4+
5+
### Changes since the latest 0.3 release:
6+
7+
* [**Pin projection has become a safe operation.**][18] In the absence of other unsafe code that you write, it is impossible to cause undefined behavior.
8+
9+
* `#[unsafe_project]` attribute has been replaced with `#[pin_project]` attribute. ([#18][18], [#33][33])
10+
11+
* [The `Unpin` argument has been removed - an `Unpin` impl is now generated by default.][18]
12+
13+
* Drop impls must be specified with `#[pinned_drop]` instead of via a normal `Drop` impl. ([#18][18], [#33][33], [#86][86])
14+
15+
* [`Unpin` impls must be specified with an impl of `UnsafeUnpin`, instead of implementing the normal `Unpin` trait.][18]
16+
17+
* [`#[pin_project]` attribute now determines the visibility of the projection type/method is based on the original type.][96]
18+
19+
* [`#[pin_project]` can now be used for public type with private field types.][53]
20+
21+
* [`#[pin_project]` can now interoperate with `#[cfg()]`.][77]
22+
23+
* [Added `project_ref` method to `#[pin_project]` types.][93]
24+
25+
* [Added `#[project_ref]` attribute.][93]
26+
27+
* [Removed "project_attr" feature and always enable `#[project]` attribute.][94]
28+
29+
* [`#[project]` attribute can now be used for `impl` blocks.][46]
30+
31+
* [`#[project]` attribute can now be used for `use` statements.][85]
32+
33+
* [`#[project]` attribute now supports `match` expressions at the position of the initializer expression of `let` expressions.][51]
34+
35+
### Changes since the 0.4.0-beta.1 release:
36+
37+
* [Fixed 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.][107]
38+
39+
[18]: https://github.com/taiki-e/pin-project/pull/18
40+
[33]: https://github.com/taiki-e/pin-project/pull/107
41+
[107]: https://github.com/taiki-e/pin-project/pull/107
42+
343
# 0.4.0-beta.1 - 2019-09-21
444

545
* [Changed the argument type of project method back to `self: Pin<&mut Self>`.][90]
@@ -42,7 +82,7 @@
4282

4383
# 0.4.0-alpha.10 - 2019-09-07
4484

45-
* [pin-project can now interoperate with `#[cfg()]`.][77]
85+
* [`#[pin_project]` can now interoperate with `#[cfg()]`.][77]
4686

4787
* Improved documentation.
4888

@@ -123,7 +163,9 @@
123163

124164
* Made `#[project]` attribute disabled by default.
125165

126-
See also [tracking issue for 0.4 release](https://github.com/taiki-e/pin-project/issues/21).
166+
See also [tracking issue for 0.4 release][21].
167+
168+
[21]: https://github.com/taiki-e/pin-project/issues/21
127169

128170
# 0.3.5 - 2019-08-14
129171

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pin-project"
3-
version = "0.4.0-beta.1"
3+
version = "0.4.0"
44
authors = ["Taiki Endo <te316e89@gmail.com>"]
55
edition = "2018"
66
license = "Apache-2.0/MIT"
@@ -20,7 +20,7 @@ all-features = true
2020
members = ["pin-project-internal"]
2121

2222
[dependencies]
23-
pin-project-internal = { version = "=0.4.0-beta.1", path = "pin-project-internal", default-features = false }
23+
pin-project-internal = { version = "=0.4.0", path = "pin-project-internal", default-features = false }
2424

2525
[dev-dependencies]
2626
compiletest = { version = "0.3.21", package = "compiletest_rs", features = ["stable", "tmp"] }

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Add this to your `Cargo.toml`:
2929

3030
```toml
3131
[dependencies]
32-
pin-project = "0.4.0-beta.1"
32+
pin-project = "0.4"
3333
```
3434

3535
The current pin-project requires Rust 1.33 or later.
@@ -64,7 +64,7 @@ See [API documentation][docs-url] for more details.
6464

6565
Also, there are examples and generated code of each feature in [examples](examples/README.md) directory.
6666

67-
[`pin_project`]: https://docs.rs/pin-project-internal/0.4.0-beta.1/pin_project_internal/attr.pin_project.html
67+
[`pin_project`]: https://docs.rs/pin-project-internal/0.4.0/pin_project_internal/attr.pin_project.html
6868

6969
## License
7070

pin-project-internal/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pin-project-internal"
3-
version = "0.4.0-beta.1"
3+
version = "0.4.0"
44
authors = ["Taiki Endo <te316e89@gmail.com>"]
55
edition = "2018"
66
license = "Apache-2.0/MIT"
@@ -24,4 +24,4 @@ quote = "1.0"
2424
syn = { version = "1.0", features = ["full", "visit-mut"] }
2525

2626
[dev-dependencies]
27-
pin-project = { version = "0.4.0-beta.1", path = ".." }
27+
pin-project = { version = "0.4.0", path = ".." }

pin-project-internal/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! An internal crate to support pin_project - **do not use directly**
22
33
#![recursion_limit = "256"]
4-
#![doc(html_root_url = "https://docs.rs/pin-project-internal/0.4.0-beta.1")]
4+
#![doc(html_root_url = "https://docs.rs/pin-project-internal/0.4.0")]
55
#![doc(test(
66
no_crate_inject,
77
attr(deny(warnings, rust_2018_idioms, single_use_lifetimes), allow(dead_code))
@@ -313,7 +313,7 @@ use utils::{Immutable, Mutable};
313313
/// [`Pin::as_mut`]: core::pin::Pin::as_mut
314314
/// [`Pin::set`]: core::pin::Pin::set
315315
/// [`drop`]: Drop::drop
316-
/// [`UnsafeUnpin`]: https://docs.rs/pin-project/0.4.0-beta.1/pin_project/trait.UnsafeUnpin.html
316+
/// [`UnsafeUnpin`]: https://docs.rs/pin-project/0.4.0/pin_project/trait.UnsafeUnpin.html
317317
/// [`project`]: ./attr.project.html
318318
/// [`project_ref`]: ./attr.project_ref.html
319319
/// [`pinned_drop`]: ./attr.pinned_drop.html

src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
//!
3535
//! There are examples and generated code of each feature in [examples](https://github.com/taiki-e/pin-project/blob/master/examples/README.md) directory.
3636
//!
37-
//! [`pin_project`]: https://docs.rs/pin-project-internal/0.4.0-beta.1/pin_project_internal/attr.pin_project.html
38-
//! [`pinned_drop`]: https://docs.rs/pin-project-internal/0.4.0-beta.1/pin_project_internal/attr.pinned_drop.html
39-
//! [`project`]: https://docs.rs/pin-project-internal/0.4.0-beta.1/pin_project_internal/attr.project.html
37+
//! [`pin_project`]: https://docs.rs/pin-project-internal/0.4.0/pin_project_internal/attr.pin_project.html
38+
//! [`pinned_drop`]: https://docs.rs/pin-project-internal/0.4.0/pin_project_internal/attr.pinned_drop.html
39+
//! [`project`]: https://docs.rs/pin-project-internal/0.4.0/pin_project_internal/attr.project.html
4040
4141
#![no_std]
4242
#![recursion_limit = "256"]
43-
#![doc(html_root_url = "https://docs.rs/pin-project/0.4.0-beta.1")]
43+
#![doc(html_root_url = "https://docs.rs/pin-project/0.4.0")]
4444
#![doc(test(
4545
no_crate_inject,
4646
attr(deny(warnings, rust_2018_idioms, single_use_lifetimes), allow(dead_code))
@@ -116,7 +116,7 @@ pub use pin_project_internal::project_ref;
116116
/// ```
117117
///
118118
/// [`PhantomPinned`]: core::marker::PhantomPinned
119-
/// [`pin_project`]: https://docs.rs/pin-project-internal/0.4.0-beta.1/pin_project_internal/attr.pin_project.html
119+
/// [`pin_project`]: https://docs.rs/pin-project-internal/0.4.0/pin_project_internal/attr.pin_project.html
120120
#[allow(unsafe_code)]
121121
pub unsafe trait UnsafeUnpin {}
122122

0 commit comments

Comments
 (0)