From 94bef4e1907719ad5bb9fd06fd805b01d0f9c119 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 6 Oct 2020 00:20:11 +0900 Subject: [PATCH] Bump MSRV to 1.37 underscore_const_names requires 1.37 --- .github/workflows/ci.yml | 7 --- CHANGELOG.md | 4 +- README.md | 6 +-- examples/enum-default-expanded.rs | 1 - examples/not_unpin-expanded.rs | 1 - examples/pinned_drop-expanded.rs | 1 - examples/project_replace-expanded.rs | 1 - examples/struct-default-expanded.rs | 1 - examples/unsafe_unpin-expanded.rs | 1 - pin-project-internal/build.rs | 50 ------------------- .../src/pin_project/derive.rs | 13 +---- .../tests/expand/default-enum.expanded.rs | 1 - .../tests/expand/default-struct.expanded.rs | 1 - .../expand/default-tuple_struct.expanded.rs | 1 - .../tests/expand/multifields-enum.expanded.rs | 1 - .../expand/multifields-struct.expanded.rs | 1 - .../multifields-tuple_struct.expanded.rs | 1 - .../tests/expand/naming-enum-all.expanded.rs | 1 - .../tests/expand/naming-enum-mut.expanded.rs | 1 - .../tests/expand/naming-enum-none.expanded.rs | 1 - .../tests/expand/naming-enum-own.expanded.rs | 1 - .../tests/expand/naming-enum-ref.expanded.rs | 1 - .../expand/naming-struct-all.expanded.rs | 1 - .../expand/naming-struct-mut.expanded.rs | 1 - .../expand/naming-struct-none.expanded.rs | 1 - .../expand/naming-struct-own.expanded.rs | 1 - .../expand/naming-struct-ref.expanded.rs | 1 - .../naming-tuple_struct-all.expanded.rs | 1 - .../naming-tuple_struct-mut.expanded.rs | 1 - .../naming-tuple_struct-none.expanded.rs | 1 - .../naming-tuple_struct-own.expanded.rs | 1 - .../naming-tuple_struct-ref.expanded.rs | 1 - .../tests/expand/not_unpin-enum.expanded.rs | 1 - .../tests/expand/not_unpin-struct.expanded.rs | 1 - .../expand/not_unpin-tuple_struct.expanded.rs | 1 - .../tests/expand/pinned_drop-enum.expanded.rs | 1 - .../expand/pinned_drop-struct.expanded.rs | 1 - .../pinned_drop-tuple_struct.expanded.rs | 1 - .../expand/project_replace-enum.expanded.rs | 1 - .../expand/project_replace-struct.expanded.rs | 1 - .../project_replace-tuple_struct.expanded.rs | 1 - .../expand/tests/expand/pub-enum.expanded.rs | 1 - .../tests/expand/pub-struct.expanded.rs | 1 - .../tests/expand/pub-tuple_struct.expanded.rs | 1 - .../expand/unsafe_unpin-enum.expanded.rs | 1 - .../expand/unsafe_unpin-struct.expanded.rs | 1 - .../unsafe_unpin-tuple_struct.expanded.rs | 1 - tests/lint.rs | 6 --- tests/pin_project.rs | 1 - tests/pinned_drop.rs | 1 - 50 files changed, 8 insertions(+), 122 deletions(-) delete mode 100644 pin-project-internal/build.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6b801ab..8a7da1d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,6 @@ jobs: rust: # This is the minimum supported Rust version of this crate. # When updating this, the reminder to update the minimum supported Rust version in README.md. - - 1.34.0 - - 1.36.0 - 1.37.0 - stable - beta @@ -52,12 +50,7 @@ jobs: if: matrix.rust == 'nightly' run: | rustup target add thumbv7m-none-eabi - - name: cargo test --tests - if: matrix.rust == '1.34.0' || matrix.rust == '1.36.0' - run: | - cargo test --all --all-features --exclude expandtest --tests - name: cargo test - if: matrix.rust != '1.34.0' && matrix.rust != '1.36.0' run: | cargo test --all --all-features --exclude expandtest - name: cargo check (no-std) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c497f56..c74e7b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](https://semver.org). ## [Unreleased] +* [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) ## [1.0.0-alpha.1] - 2020-09-22 @@ -206,7 +208,7 @@ See also [tracking issue for 1.0 release](https://github.com/taiki-e/pin-project } ``` - *[Note: This raises the minimum supported Rust version of this crate from rustc 1.33 to rustc 1.34.](https://github.com/taiki-e/pin-project/pull/219#pullrequestreview-408644187)* + *[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)* * [Fixed an issue where duplicate `#[project]` attributes were ignored.][218] diff --git a/README.md b/README.md index b7047b9d..1fd2c555 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ [docs-url]: https://docs.rs/pin-project [license-badge]: https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg [license]: #license -[rustc-badge]: https://img.shields.io/badge/rustc-1.34+-lightgray.svg -[rustc-url]: https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html +[rustc-badge]: https://img.shields.io/badge/rustc-1.37+-lightgray.svg +[rustc-url]: https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html A crate for safe and ergonomic [pin-projection]. @@ -25,7 +25,7 @@ Add this to your `Cargo.toml`: pin-project = "1.0.0-alpha.1" ``` -The current pin-project requires Rust 1.34 or later. +The current pin-project requires Rust 1.37 or later. ## Examples diff --git a/examples/enum-default-expanded.rs b/examples/enum-default-expanded.rs index fb32217e..a8a33aaf 100644 --- a/examples/enum-default-expanded.rs +++ b/examples/enum-default-expanded.rs @@ -40,7 +40,6 @@ where Unpinned(&'pin mut (U)), } -#[doc(hidden)] #[allow(non_upper_case_globals)] #[allow(clippy::used_underscore_binding)] #[allow(box_pointers)] diff --git a/examples/not_unpin-expanded.rs b/examples/not_unpin-expanded.rs index b3c2da19..c9e87952 100644 --- a/examples/not_unpin-expanded.rs +++ b/examples/not_unpin-expanded.rs @@ -29,7 +29,6 @@ pub struct Struct { unpinned: U, } -#[doc(hidden)] #[allow(non_upper_case_globals)] #[allow(clippy::used_underscore_binding)] #[allow(box_pointers)] diff --git a/examples/pinned_drop-expanded.rs b/examples/pinned_drop-expanded.rs index b9ff1f90..6bbad55d 100644 --- a/examples/pinned_drop-expanded.rs +++ b/examples/pinned_drop-expanded.rs @@ -33,7 +33,6 @@ pub struct Struct<'a, T> { field: T, } -#[doc(hidden)] #[allow(non_upper_case_globals)] #[allow(clippy::used_underscore_binding)] #[allow(box_pointers)] diff --git a/examples/project_replace-expanded.rs b/examples/project_replace-expanded.rs index 403c0901..9eb6fc84 100644 --- a/examples/project_replace-expanded.rs +++ b/examples/project_replace-expanded.rs @@ -26,7 +26,6 @@ struct Struct { unpinned: U, } -#[doc(hidden)] #[allow(non_upper_case_globals)] #[allow(clippy::used_underscore_binding)] #[allow(box_pointers)] diff --git a/examples/struct-default-expanded.rs b/examples/struct-default-expanded.rs index a5ee6496..373f0ffb 100644 --- a/examples/struct-default-expanded.rs +++ b/examples/struct-default-expanded.rs @@ -26,7 +26,6 @@ struct Struct { unpinned: U, } -#[doc(hidden)] #[allow(non_upper_case_globals)] #[allow(clippy::used_underscore_binding)] #[allow(box_pointers)] diff --git a/examples/unsafe_unpin-expanded.rs b/examples/unsafe_unpin-expanded.rs index 7030fa79..c88c3b3e 100644 --- a/examples/unsafe_unpin-expanded.rs +++ b/examples/unsafe_unpin-expanded.rs @@ -28,7 +28,6 @@ pub struct Struct { unpinned: U, } -#[doc(hidden)] #[allow(non_upper_case_globals)] #[allow(clippy::used_underscore_binding)] #[allow(box_pointers)] diff --git a/pin-project-internal/build.rs b/pin-project-internal/build.rs deleted file mode 100644 index f2b417d6..00000000 --- a/pin-project-internal/build.rs +++ /dev/null @@ -1,50 +0,0 @@ -#![warn(unsafe_code)] -#![warn(rust_2018_idioms, single_use_lifetimes)] - -use std::{env, process::Command, str}; - -// The rustc-cfg strings below are *not* public API. Please let us know by -// opening a GitHub issue if your build environment requires some way to enable -// these cfgs other than by executing our build script. -fn main() { - let minor = match rustc_minor_version() { - Some(minor) => minor, - None => return, - }; - - // Underscore const names requires Rust 1.37: - // https://github.com/rust-lang/rust/pull/61347 - if minor >= 37 { - println!("cargo:rustc-cfg=underscore_consts"); - } -} - -fn rustc_minor_version() -> Option { - let rustc = env::var_os("RUSTC")?; - let output = Command::new(rustc).args(&["--version", "--verbose"]).output().ok()?; - if !output.status.success() { - return None; - } - let output = str::from_utf8(&output.stdout).ok()?; - - // Find the release line in the verbose version output. - let release = output - .lines() - .find(|line| line.starts_with("release: ")) - .map(|line| &line["release: ".len()..])?; - - // Split the version and channel info. - let mut version_channel = release.split('-'); - let version = version_channel.next().unwrap(); - let _channel = version_channel.next(); - - // Split the version into semver components. - let mut digits = version.splitn(3, '.'); - let major = digits.next()?; - if major != "1" { - return None; - } - let minor = digits.next()?.parse().ok()?; - let _patch = digits.next()?; - Some(minor) -} diff --git a/pin-project-internal/src/pin_project/derive.rs b/pin-project-internal/src/pin_project/derive.rs index a8b5abe6..36abcf98 100644 --- a/pin-project-internal/src/pin_project/derive.rs +++ b/pin-project-internal/src/pin_project/derive.rs @@ -65,15 +65,7 @@ impl GenerateTokens { let unpin_impl = make_unpin_impl(cx); let drop_impl = make_drop_impl(cx); - - let mut allowed_lints = global_allowed_lints(); - let dummy_const = if cfg!(underscore_consts) { - format_ident!("_") - } else { - // for Rust 1.34 - 1.36 - allowed_lints.extend(quote!(#[allow(non_upper_case_globals)])); - format_ident!("__SCOPE_{}", cx.orig.ident) - }; + let allowed_lints = global_allowed_lints(); tokens.extend(quote! { // All items except projected types are generated inside a `const` scope. @@ -90,10 +82,9 @@ impl GenerateTokens { // * https://github.com/rust-lang/rust/issues/63281 // * https://github.com/taiki-e/pin-project/pull/53#issuecomment-525906867 // * https://github.com/taiki-e/pin-project/pull/70 - #[doc(hidden)] // for Rust 1.34 - 1.41 #allowed_lints #[allow(clippy::used_underscore_binding)] - const #dummy_const: () = { + const _: () = { #scoped #unpin_impl #drop_impl diff --git a/tests/expand/tests/expand/default-enum.expanded.rs b/tests/expand/tests/expand/default-enum.expanded.rs index 96041ad0..d2b97119 100644 --- a/tests/expand/tests/expand/default-enum.expanded.rs +++ b/tests/expand/tests/expand/default-enum.expanded.rs @@ -46,7 +46,6 @@ where Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/default-struct.expanded.rs b/tests/expand/tests/expand/default-struct.expanded.rs index adcf9018..1b4c5b58 100644 --- a/tests/expand/tests/expand/default-struct.expanded.rs +++ b/tests/expand/tests/expand/default-struct.expanded.rs @@ -5,7 +5,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/default-tuple_struct.expanded.rs b/tests/expand/tests/expand/default-tuple_struct.expanded.rs index 58e6f175..61c9286d 100644 --- a/tests/expand/tests/expand/default-tuple_struct.expanded.rs +++ b/tests/expand/tests/expand/default-tuple_struct.expanded.rs @@ -1,7 +1,6 @@ use pin_project::pin_project; #[pin(__private())] struct TupleStruct(#[pin] T, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/multifields-enum.expanded.rs b/tests/expand/tests/expand/multifields-enum.expanded.rs index 81f6bdea..cc1f2686 100644 --- a/tests/expand/tests/expand/multifields-enum.expanded.rs +++ b/tests/expand/tests/expand/multifields-enum.expanded.rs @@ -86,7 +86,6 @@ enum EnumProjOwn { ), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/multifields-struct.expanded.rs b/tests/expand/tests/expand/multifields-struct.expanded.rs index 421df5ef..bf26f95a 100644 --- a/tests/expand/tests/expand/multifields-struct.expanded.rs +++ b/tests/expand/tests/expand/multifields-struct.expanded.rs @@ -8,7 +8,6 @@ struct Struct { unpinned1: U, unpinned2: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/multifields-tuple_struct.expanded.rs b/tests/expand/tests/expand/multifields-tuple_struct.expanded.rs index 752d6ac0..33086bef 100644 --- a/tests/expand/tests/expand/multifields-tuple_struct.expanded.rs +++ b/tests/expand/tests/expand/multifields-tuple_struct.expanded.rs @@ -1,7 +1,6 @@ use pin_project::pin_project; #[pin(__private(project_replace))] struct TupleStruct(#[pin] T, #[pin] T, U, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-enum-all.expanded.rs b/tests/expand/tests/expand/naming-enum-all.expanded.rs index 476950f9..560a97c0 100644 --- a/tests/expand/tests/expand/naming-enum-all.expanded.rs +++ b/tests/expand/tests/expand/naming-enum-all.expanded.rs @@ -62,7 +62,6 @@ enum ProjOwn { Tuple(::pin_project::__private::PhantomData, U), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-enum-mut.expanded.rs b/tests/expand/tests/expand/naming-enum-mut.expanded.rs index 22ad9d92..f7ea0dbb 100644 --- a/tests/expand/tests/expand/naming-enum-mut.expanded.rs +++ b/tests/expand/tests/expand/naming-enum-mut.expanded.rs @@ -28,7 +28,6 @@ where Tuple(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U)), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-enum-none.expanded.rs b/tests/expand/tests/expand/naming-enum-none.expanded.rs index aaa47fb2..1ca058db 100644 --- a/tests/expand/tests/expand/naming-enum-none.expanded.rs +++ b/tests/expand/tests/expand/naming-enum-none.expanded.rs @@ -9,7 +9,6 @@ enum Enum { Tuple(#[pin] T, U), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-enum-own.expanded.rs b/tests/expand/tests/expand/naming-enum-own.expanded.rs index 79b2ae34..e13ac2c4 100644 --- a/tests/expand/tests/expand/naming-enum-own.expanded.rs +++ b/tests/expand/tests/expand/naming-enum-own.expanded.rs @@ -25,7 +25,6 @@ enum ProjOwn { Tuple(::pin_project::__private::PhantomData, U), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-enum-ref.expanded.rs b/tests/expand/tests/expand/naming-enum-ref.expanded.rs index 86bcd0e8..a91ca917 100644 --- a/tests/expand/tests/expand/naming-enum-ref.expanded.rs +++ b/tests/expand/tests/expand/naming-enum-ref.expanded.rs @@ -27,7 +27,6 @@ where Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-struct-all.expanded.rs b/tests/expand/tests/expand/naming-struct-all.expanded.rs index 1f5a8b05..f3cfe1e1 100644 --- a/tests/expand/tests/expand/naming-struct-all.expanded.rs +++ b/tests/expand/tests/expand/naming-struct-all.expanded.rs @@ -45,7 +45,6 @@ struct ProjOwn { pinned: ::pin_project::__private::PhantomData, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-struct-mut.expanded.rs b/tests/expand/tests/expand/naming-struct-mut.expanded.rs index 4f158415..e25e45ff 100644 --- a/tests/expand/tests/expand/naming-struct-mut.expanded.rs +++ b/tests/expand/tests/expand/naming-struct-mut.expanded.rs @@ -20,7 +20,6 @@ where pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-struct-none.expanded.rs b/tests/expand/tests/expand/naming-struct-none.expanded.rs index adcf9018..1b4c5b58 100644 --- a/tests/expand/tests/expand/naming-struct-none.expanded.rs +++ b/tests/expand/tests/expand/naming-struct-none.expanded.rs @@ -5,7 +5,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-struct-own.expanded.rs b/tests/expand/tests/expand/naming-struct-own.expanded.rs index e7016f1f..2dc885fa 100644 --- a/tests/expand/tests/expand/naming-struct-own.expanded.rs +++ b/tests/expand/tests/expand/naming-struct-own.expanded.rs @@ -16,7 +16,6 @@ struct ProjOwn { pinned: ::pin_project::__private::PhantomData, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-struct-ref.expanded.rs b/tests/expand/tests/expand/naming-struct-ref.expanded.rs index de0c75db..ce94803a 100644 --- a/tests/expand/tests/expand/naming-struct-ref.expanded.rs +++ b/tests/expand/tests/expand/naming-struct-ref.expanded.rs @@ -19,7 +19,6 @@ where pinned: ::pin_project::__private::Pin<&'pin (T)>, unpinned: &'pin (U), } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-tuple_struct-all.expanded.rs b/tests/expand/tests/expand/naming-tuple_struct-all.expanded.rs index c77f0275..f880aba1 100644 --- a/tests/expand/tests/expand/naming-tuple_struct-all.expanded.rs +++ b/tests/expand/tests/expand/naming-tuple_struct-all.expanded.rs @@ -30,7 +30,6 @@ where #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] struct ProjOwn(::pin_project::__private::PhantomData, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-tuple_struct-mut.expanded.rs b/tests/expand/tests/expand/naming-tuple_struct-mut.expanded.rs index 277c13c8..55d5de78 100644 --- a/tests/expand/tests/expand/naming-tuple_struct-mut.expanded.rs +++ b/tests/expand/tests/expand/naming-tuple_struct-mut.expanded.rs @@ -12,7 +12,6 @@ struct TupleStruct(#[pin] T, U); struct Proj<'pin, T, U>(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U)) where TupleStruct: 'pin; -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-tuple_struct-none.expanded.rs b/tests/expand/tests/expand/naming-tuple_struct-none.expanded.rs index 58e6f175..61c9286d 100644 --- a/tests/expand/tests/expand/naming-tuple_struct-none.expanded.rs +++ b/tests/expand/tests/expand/naming-tuple_struct-none.expanded.rs @@ -1,7 +1,6 @@ use pin_project::pin_project; #[pin(__private())] struct TupleStruct(#[pin] T, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-tuple_struct-own.expanded.rs b/tests/expand/tests/expand/naming-tuple_struct-own.expanded.rs index 6c6e0530..c477e36c 100644 --- a/tests/expand/tests/expand/naming-tuple_struct-own.expanded.rs +++ b/tests/expand/tests/expand/naming-tuple_struct-own.expanded.rs @@ -9,7 +9,6 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] struct ProjOwn(::pin_project::__private::PhantomData, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/naming-tuple_struct-ref.expanded.rs b/tests/expand/tests/expand/naming-tuple_struct-ref.expanded.rs index 438aade5..46e94c15 100644 --- a/tests/expand/tests/expand/naming-tuple_struct-ref.expanded.rs +++ b/tests/expand/tests/expand/naming-tuple_struct-ref.expanded.rs @@ -11,7 +11,6 @@ struct TupleStruct(#[pin] T, U); struct ProjRef<'pin, T, U>(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)) where TupleStruct: 'pin; -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/not_unpin-enum.expanded.rs b/tests/expand/tests/expand/not_unpin-enum.expanded.rs index fe46b8d8..b2e7e86f 100644 --- a/tests/expand/tests/expand/not_unpin-enum.expanded.rs +++ b/tests/expand/tests/expand/not_unpin-enum.expanded.rs @@ -46,7 +46,6 @@ where Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/not_unpin-struct.expanded.rs b/tests/expand/tests/expand/not_unpin-struct.expanded.rs index 34cb6d96..2bc64453 100644 --- a/tests/expand/tests/expand/not_unpin-struct.expanded.rs +++ b/tests/expand/tests/expand/not_unpin-struct.expanded.rs @@ -5,7 +5,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/not_unpin-tuple_struct.expanded.rs b/tests/expand/tests/expand/not_unpin-tuple_struct.expanded.rs index 703086d7..529008e4 100644 --- a/tests/expand/tests/expand/not_unpin-tuple_struct.expanded.rs +++ b/tests/expand/tests/expand/not_unpin-tuple_struct.expanded.rs @@ -1,7 +1,6 @@ use pin_project::pin_project; # [pin (__private (! Unpin))] struct TupleStruct(#[pin] T, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/pinned_drop-enum.expanded.rs b/tests/expand/tests/expand/pinned_drop-enum.expanded.rs index ead24495..81c34c69 100644 --- a/tests/expand/tests/expand/pinned_drop-enum.expanded.rs +++ b/tests/expand/tests/expand/pinned_drop-enum.expanded.rs @@ -47,7 +47,6 @@ where Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/pinned_drop-struct.expanded.rs b/tests/expand/tests/expand/pinned_drop-struct.expanded.rs index b661beee..0c18f1b7 100644 --- a/tests/expand/tests/expand/pinned_drop-struct.expanded.rs +++ b/tests/expand/tests/expand/pinned_drop-struct.expanded.rs @@ -6,7 +6,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/pinned_drop-tuple_struct.expanded.rs b/tests/expand/tests/expand/pinned_drop-tuple_struct.expanded.rs index 21ecc014..0f784b9d 100644 --- a/tests/expand/tests/expand/pinned_drop-tuple_struct.expanded.rs +++ b/tests/expand/tests/expand/pinned_drop-tuple_struct.expanded.rs @@ -2,7 +2,6 @@ use pin_project::{pin_project, pinned_drop}; use std::pin::Pin; #[pin(__private(PinnedDrop))] struct TupleStruct(#[pin] T, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/project_replace-enum.expanded.rs b/tests/expand/tests/expand/project_replace-enum.expanded.rs index 5af9575c..762aeebc 100644 --- a/tests/expand/tests/expand/project_replace-enum.expanded.rs +++ b/tests/expand/tests/expand/project_replace-enum.expanded.rs @@ -25,7 +25,6 @@ enum EnumProjOwn { Tuple(::pin_project::__private::PhantomData, U), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/project_replace-struct.expanded.rs b/tests/expand/tests/expand/project_replace-struct.expanded.rs index 9979c5fc..46046459 100644 --- a/tests/expand/tests/expand/project_replace-struct.expanded.rs +++ b/tests/expand/tests/expand/project_replace-struct.expanded.rs @@ -5,7 +5,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/project_replace-tuple_struct.expanded.rs b/tests/expand/tests/expand/project_replace-tuple_struct.expanded.rs index d918bc33..75a5faff 100644 --- a/tests/expand/tests/expand/project_replace-tuple_struct.expanded.rs +++ b/tests/expand/tests/expand/project_replace-tuple_struct.expanded.rs @@ -1,7 +1,6 @@ use pin_project::pin_project; #[pin(__private(project_replace))] struct TupleStruct(#[pin] T, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/pub-enum.expanded.rs b/tests/expand/tests/expand/pub-enum.expanded.rs index c079e5a4..2a4ab400 100644 --- a/tests/expand/tests/expand/pub-enum.expanded.rs +++ b/tests/expand/tests/expand/pub-enum.expanded.rs @@ -46,7 +46,6 @@ where Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/pub-struct.expanded.rs b/tests/expand/tests/expand/pub-struct.expanded.rs index 17dbd438..b26fe92a 100644 --- a/tests/expand/tests/expand/pub-struct.expanded.rs +++ b/tests/expand/tests/expand/pub-struct.expanded.rs @@ -5,7 +5,6 @@ pub struct Struct { pub pinned: T, pub unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/pub-tuple_struct.expanded.rs b/tests/expand/tests/expand/pub-tuple_struct.expanded.rs index 9d5ef8d9..e04ea5cb 100644 --- a/tests/expand/tests/expand/pub-tuple_struct.expanded.rs +++ b/tests/expand/tests/expand/pub-tuple_struct.expanded.rs @@ -1,7 +1,6 @@ use pin_project::pin_project; #[pin(__private())] pub struct TupleStruct(#[pin] pub T, pub U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/unsafe_unpin-enum.expanded.rs b/tests/expand/tests/expand/unsafe_unpin-enum.expanded.rs index ed968743..5306f9f4 100644 --- a/tests/expand/tests/expand/unsafe_unpin-enum.expanded.rs +++ b/tests/expand/tests/expand/unsafe_unpin-enum.expanded.rs @@ -46,7 +46,6 @@ where Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)), Unit, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/unsafe_unpin-struct.expanded.rs b/tests/expand/tests/expand/unsafe_unpin-struct.expanded.rs index 2d6eb9a4..761e36c5 100644 --- a/tests/expand/tests/expand/unsafe_unpin-struct.expanded.rs +++ b/tests/expand/tests/expand/unsafe_unpin-struct.expanded.rs @@ -5,7 +5,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/expand/tests/expand/unsafe_unpin-tuple_struct.expanded.rs b/tests/expand/tests/expand/unsafe_unpin-tuple_struct.expanded.rs index ef085748..1173646f 100644 --- a/tests/expand/tests/expand/unsafe_unpin-tuple_struct.expanded.rs +++ b/tests/expand/tests/expand/unsafe_unpin-tuple_struct.expanded.rs @@ -1,7 +1,6 @@ use pin_project::{pin_project, UnsafeUnpin}; #[pin(__private(UnsafeUnpin))] struct TupleStruct(#[pin] T, U); -#[doc(hidden)] #[allow(box_pointers)] #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] diff --git a/tests/lint.rs b/tests/lint.rs index c000aa63..d742bf30 100644 --- a/tests/lint.rs +++ b/tests/lint.rs @@ -91,7 +91,6 @@ pub mod box_pointers { pub mod explicit_outlives_requirements { use pin_project::pin_project; - #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[allow(explicit_outlives_requirements)] // for the type itself: https://github.com/rust-lang/rust/issues/60993 #[pin_project(project_replace)] #[derive(Debug)] @@ -105,7 +104,6 @@ pub mod explicit_outlives_requirements { pub unpinned: &'a mut U, } - #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[allow(explicit_outlives_requirements)] // for the type itself: https://github.com/rust-lang/rust/issues/60993 #[pin_project(project_replace)] #[derive(Debug)] @@ -114,7 +112,6 @@ pub mod explicit_outlives_requirements { T: ?Sized, U: ?Sized; - #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[allow(explicit_outlives_requirements)] // for the type itself: https://github.com/rust-lang/rust/issues/60993 #[pin_project( project = EnumProj, @@ -178,7 +175,6 @@ pub mod variant_size_differences { pub mod clippy_mut_mut { use pin_project::pin_project; - #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[pin_project(project_replace)] #[derive(Debug)] pub struct Struct<'a, T, U> { @@ -187,12 +183,10 @@ pub mod clippy_mut_mut { pub unpinned: &'a mut U, } - #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[pin_project(project_replace)] #[derive(Debug)] pub struct TupleStruct<'a, T, U>(#[pin] &'a mut T, &'a mut U); - #[rustversion::attr(before(1.37), allow(single_use_lifetimes))] // https://github.com/rust-lang/rust/issues/53738 #[pin_project( project = EnumProj, project_ref = EnumProjRef, diff --git a/tests/pin_project.rs b/tests/pin_project.rs index a02bda49..3b20cba6 100644 --- a/tests/pin_project.rs +++ b/tests/pin_project.rs @@ -449,7 +449,6 @@ fn lifetime_project() { } } -#[rustversion::since(1.36)] // https://github.com/rust-lang/rust/pull/61207 #[test] fn lifetime_project_elided() { #[pin_project(project_replace)] diff --git a/tests/pinned_drop.rs b/tests/pinned_drop.rs index 1b561290..24fbe251 100644 --- a/tests/pinned_drop.rs +++ b/tests/pinned_drop.rs @@ -140,7 +140,6 @@ fn self_struct() { } } -#[rustversion::since(1.37)] // type_alias_enum_variants requires Rust 1.37 #[test] fn self_enum() { #[pin_project(PinnedDrop, project = EnumProj, project_ref = EnumProjRef)]