From 322e8d21c66154e6164348cfd4a533b8c91e9f59 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 13 Oct 2020 23:23:23 +0900 Subject: [PATCH] Release 1.0.0 --- CHANGELOG.md | 40 +++++++++++++++++++++++++++++++-- Cargo.toml | 4 ++-- README.md | 4 ++-- examples/README.md | 8 +++---- pin-project-internal/Cargo.toml | 4 ++-- pin-project-internal/src/lib.rs | 4 ++-- src/lib.rs | 2 +- 7 files changed, 51 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61fea76c..d9cba323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 { + Variant(#[pin] T), + } + + - #[project] + fn func(x: Pin<&mut Enum>) { + - #[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 @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 8d2889f0..529a385f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pin-project" -version = "1.0.0-alpha.1" +version = "1.0.0" authors = ["Taiki Endo "] edition = "2018" license = "Apache-2.0 OR MIT" @@ -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" } diff --git a/README.md b/README.md index 1fd2c555..0d5f5d70 100644 --- a/README.md +++ b/README.md @@ -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. @@ -86,7 +86,7 @@ impl Enum { 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 diff --git a/examples/README.md b/examples/README.md index cd2e49ec..3f0d87e2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -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. diff --git a/pin-project-internal/Cargo.toml b/pin-project-internal/Cargo.toml index a782840a..5cd58b69 100644 --- a/pin-project-internal/Cargo.toml +++ b/pin-project-internal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pin-project-internal" -version = "1.0.0-alpha.1" +version = "1.0.0" authors = ["Taiki Endo "] edition = "2018" license = "Apache-2.0 OR MIT" @@ -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" diff --git a/pin-project-internal/src/lib.rs b/pin-project-internal/src/lib.rs index 4cb72ee0..56153d4c 100644 --- a/pin-project-internal/src/lib.rs +++ b/pin-project-internal/src/lib.rs @@ -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)) @@ -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 diff --git a/src/lib.rs b/src/lib.rs index 8edd8a0a..7d64ba1a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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))