Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0 #297

Merged
merged 1 commit into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,44 @@ This project adheres to [Semantic Versioning](https://semver.org).

## [Unreleased]

## [1.0.0] - 2020-10-13

* [Remove deprecated `#[project]`, `#[project_ref]`, and `#[project_replace]` attributes.](https://github.com/taiki-e/pin-project/pull/265)

Name the projected type by passing an argument with the same name as the method to the `#[pin_project]` attribute instead:

```diff
- #[pin_project]
+ #[pin_project(project = EnumProj)]
enum Enum<T> {
Variant(#[pin] T),
}

- #[project]
fn func<T>(x: Pin<&mut Enum<T>>) {
- #[project]
match x.project() {
- Enum::Variant(_) => { /* ... */ }
+ EnumProj::Variant(_) => { /* ... */ }
}
}
```

* [Remove deprecated `Replace` argument from `#[pin_project]` attribute.](https://github.com/taiki-e/pin-project/pull/266) Use `project_replace` argument instead.

* [Optimize code generation when used on enums.](https://github.com/taiki-e/pin-project/pull/270)

* [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)

* [Suppress `clippy::redundant_pub_crate` lint in generated code.](https://github.com/taiki-e/pin-project/pull/284)
* 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))

* Diagnostic improvements.

Changes since the 1.0.0-alpha.1 release:

* [Fix drop order of pinned fields in project_replace](https://github.com/taiki-e/pin-project/pull/287)

* Update minimal version of `syn` to 1.0.44

## [1.0.0-alpha.1] - 2020-09-22

Expand Down Expand Up @@ -602,7 +637,8 @@ See also [tracking issue for 0.4 release][21].

Initial release

[Unreleased]: https://github.com/taiki-e/pin-project/compare/v1.0.0-alpha.1...HEAD
[Unreleased]: https://github.com/taiki-e/pin-project/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/taiki-e/pin-project/compare/v1.0.0-alpha.1...v1.0.0
[1.0.0-alpha.1]: https://github.com/taiki-e/pin-project/compare/v0.4.23...v1.0.0-alpha.1
[0.4.27]: https://github.com/taiki-e/pin-project/compare/v0.4.26...v0.4.27
[0.4.26]: https://github.com/taiki-e/pin-project/compare/v0.4.25...v0.4.26
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pin-project"
version = "1.0.0-alpha.1"
version = "1.0.0"
authors = ["Taiki Endo <[email protected]>"]
edition = "2018"
license = "Apache-2.0 OR MIT"
Expand Down Expand Up @@ -29,7 +29,7 @@ members = [
]

[dependencies]
pin-project-internal = { version = "=1.0.0-alpha.1", path = "pin-project-internal", default-features = false }
pin-project-internal = { version = "=1.0.0", path = "pin-project-internal", default-features = false }

[dev-dependencies]
pin-project-auxiliary-macro = { version = "0", path = "tests/auxiliary/macro" }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
pin-project = "1.0.0-alpha.1"
pin-project = "1"
```

The current pin-project requires Rust 1.37 or later.
Expand Down Expand Up @@ -86,7 +86,7 @@ impl<T, U> Enum<T, U> {
See [documentation][docs-url] for more details, and
see [examples] directory for more examples and generated code.

[`pin_project`]: https://docs.rs/pin-project/1.0.0-alpha.1/pin_project/attr.pin_project.html
[`pin_project`]: https://docs.rs/pin-project/1/pin_project/attr.pin_project.html
[enum-default-expanded]: examples/enum-default-expanded.rs
[examples]: examples/README.md
[pin-projection]: https://doc.rust-lang.org/nightly/std/pin/index.html#projections-and-structural-pinning
Expand Down
8 changes: 4 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@

* [example](unsafe_unpin.rs)
* [generated code](unsafe_unpin-expanded.rs)
* [`UnsafeUnpin` documentation](https://docs.rs/pin-project/1.0.0-alpha.1/pin_project/trait.UnsafeUnpin.html)
* [`UnsafeUnpin` documentation](https://docs.rs/pin-project/1/pin_project/trait.UnsafeUnpin.html)

### Manual implementation of `Drop` by `#[pinned_drop]`

* [example](pinned_drop.rs)
* [generated code](pinned_drop-expanded.rs)
* [`#[pinned_drop]` documentation](https://docs.rs/pin-project/1.0.0-alpha.1/pin_project/attr.pinned_drop.html)
* [`#[pinned_drop]` documentation](https://docs.rs/pin-project/1/pin_project/attr.pinned_drop.html)

### `project_replace()` method

* [example](project_replace.rs)
* [generated code](project_replace-expanded.rs)
* [`project_replace()` documentation](https://docs.rs/pin-project/1.0.0-alpha.1/pin_project/attr.pin_project.html#project_replace)
* [`project_replace()` documentation](https://docs.rs/pin-project/1/pin_project/attr.pin_project.html#project_replace)

### Ensure `!Unpin` by `#[pin_project(!Unpin)]`

* [example](not_unpin.rs)
* [generated code](not_unpin-expanded.rs)
* [`!Unpin` documentation](https://docs.rs/pin-project/1.0.0-alpha.1/pin_project/attr.pin_project.html#unpin)
* [`!Unpin` documentation](https://docs.rs/pin-project/1/pin_project/attr.pin_project.html#unpin)

Note: These generated code examples are the little simplified version of the actual generated code.
See [expansion tests](../tests/expand/README.md) if you want to see the exact version of the actual generated code.
4 changes: 2 additions & 2 deletions pin-project-internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pin-project-internal"
version = "1.0.0-alpha.1"
version = "1.0.0"
authors = ["Taiki Endo <[email protected]>"]
edition = "2018"
license = "Apache-2.0 OR MIT"
Expand All @@ -25,5 +25,5 @@ quote = "1"
syn = { version = "1.0.44", features = ["full", "visit-mut"] }

[dev-dependencies]
pin-project = { version = "1.0.0-alpha.1", path = ".." }
pin-project = { version = "1.0.0", path = ".." }
rustversion = "1"
4 changes: 2 additions & 2 deletions pin-project-internal/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Implementation detail of the `pin-project` crate. - **do not use directly**

#![doc(html_root_url = "https://docs.rs/pin-project-internal/1.0.0-alpha.1")]
#![doc(html_root_url = "https://docs.rs/pin-project-internal/1.0.0")]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms, single_use_lifetimes), allow(dead_code))
Expand Down Expand Up @@ -472,7 +472,7 @@ use proc_macro::TokenStream;
/// [`Pin::as_mut`]: core::pin::Pin::as_mut
/// [`Pin::set`]: core::pin::Pin::set
/// [`Pin`]: core::pin::Pin
/// [`UnsafeUnpin`]: https://docs.rs/pin-project/1.0.0-alpha.1/pin_project/trait.UnsafeUnpin.html
/// [`UnsafeUnpin`]: https://docs.rs/pin-project/1/pin_project/trait.UnsafeUnpin.html
/// [drop-guarantee]: core::pin#drop-guarantee
/// [pin-projection]: core::pin#projections-and-structural-pinning
/// [pinned-drop]: macro@pin_project#pinned_drop
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
//! [struct-default-expanded]: https://github.com/taiki-e/pin-project/blob/master/examples/struct-default-expanded.rs

#![no_std]
#![doc(html_root_url = "https://docs.rs/pin-project/1.0.0-alpha.1")]
#![doc(html_root_url = "https://docs.rs/pin-project/1.0.0")]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms, single_use_lifetimes), allow(dead_code))
Expand Down