From c1569cc62c4d1c5daf604922102c09fed8a91eb4 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Mon, 9 Aug 2021 10:36:36 -0700 Subject: Upgrade rust/crates/pin-project to 1.0.8 Test: make Change-Id: I5d34b05966fb665ac1d6a09229743a24d6927742 --- .cargo_vcs_info.json | 2 +- Android.bp | 6 +- CHANGELOG.md | 9 ++- Cargo.toml | 4 +- Cargo.toml.orig | 4 +- METADATA | 8 +-- examples/enum-default-expanded.rs | 6 +- examples/pinned_drop-expanded.rs | 2 +- src/lib.rs | 2 +- tests/compiletest.rs | 2 +- tests/expand/default/enum.expanded.rs | 6 +- tests/expand/default/struct.expanded.rs | 20 +------ tests/expand/default/tuple_struct.expanded.rs | 20 +------ tests/expand/multifields/enum.expanded.rs | 7 ++- tests/expand/multifields/struct.expanded.rs | 28 +-------- tests/expand/multifields/tuple_struct.expanded.rs | 28 +-------- tests/expand/naming/enum-all.expanded.rs | 7 ++- tests/expand/naming/enum-mut.expanded.rs | 4 +- tests/expand/naming/enum-none.expanded.rs | 2 + tests/expand/naming/enum-own.expanded.rs | 3 + tests/expand/naming/enum-ref.expanded.rs | 4 +- tests/expand/naming/struct-all.expanded.rs | 7 ++- tests/expand/naming/struct-mut.expanded.rs | 13 +---- tests/expand/naming/struct-none.expanded.rs | 20 +------ tests/expand/naming/struct-own.expanded.rs | 21 +------ tests/expand/naming/struct-ref.expanded.rs | 13 +---- tests/expand/naming/tuple_struct-all.expanded.rs | 7 ++- tests/expand/naming/tuple_struct-mut.expanded.rs | 13 +---- tests/expand/naming/tuple_struct-none.expanded.rs | 20 +------ tests/expand/naming/tuple_struct-own.expanded.rs | 21 +------ tests/expand/naming/tuple_struct-ref.expanded.rs | 13 +---- tests/expand/not_unpin/enum.expanded.rs | 6 +- tests/expand/not_unpin/struct.expanded.rs | 20 +------ tests/expand/not_unpin/tuple_struct.expanded.rs | 20 +------ tests/expand/pinned_drop/enum.expanded.rs | 6 +- tests/expand/pinned_drop/struct.expanded.rs | 20 +------ tests/expand/pinned_drop/tuple_struct.expanded.rs | 20 +------ tests/expand/project_replace/enum.expanded.rs | 3 + tests/expand/project_replace/struct.expanded.rs | 28 +-------- .../project_replace/tuple_struct.expanded.rs | 28 +-------- tests/expand/pub/enum.expanded.rs | 6 +- tests/expand/pub/struct.expanded.rs | 20 +------ tests/expand/pub/tuple_struct.expanded.rs | 20 +------ tests/expand/unsafe_unpin/enum.expanded.rs | 6 +- tests/expand/unsafe_unpin/struct.expanded.rs | 20 +------ tests/expand/unsafe_unpin/tuple_struct.expanded.rs | 20 +------ tests/expandtest.rs | 2 +- tests/lint.rs | 67 ++++++++++++++++------ tests/pin_project.rs | 7 ++- tests/pinned_drop.rs | 14 ++--- tests/repr_packed.rs | 4 +- tests/ui/not_unpin/impl-unsafe-unpin.stderr | 6 +- tests/ui/pin_project/add-attr-to-struct.stderr | 4 +- tests/ui/pin_project/add-pinned-field.stderr | 19 +++++- tests/ui/pin_project/conflict-drop.stderr | 2 +- tests/ui/pin_project/conflict-unpin.stderr | 6 +- tests/ui/pin_project/impl-unsafe-unpin.stderr | 6 +- .../ui/pin_project/overlapping_unpin_struct.stderr | 9 ++- tests/ui/pin_project/packed-name-value.stderr | 12 ++++ tests/ui/pin_project/packed_sneaky-2.stderr | 2 +- tests/ui/pin_project/packed_sneaky-3.stderr | 6 +- .../ui/pin_project/project_replace_unsized.stderr | 60 ++++++++++--------- .../project_replace_unsized_fn_params.stderr | 60 ++++++++++--------- .../ui/pin_project/remove-attr-from-struct.stderr | 46 +++++++-------- tests/ui/pinned_drop/call-drop-inner.stderr | 2 +- tests/ui/pinned_drop/conditional-drop-impl.stderr | 32 ++++++----- .../ui/pinned_drop/forget-pinned-drop-impl.stderr | 16 ++++-- tests/ui/pinned_drop/self.stderr | 4 +- .../marker_trait_attr-feature-gate.stderr | 2 +- .../ui/unstable-features/marker_trait_attr.stderr | 2 +- .../overlapping_marker_traits-feature-gate.stderr | 2 +- .../overlapping_marker_traits.stderr | 2 +- .../trivial_bounds-feature-gate.stderr | 12 +++- 73 files changed, 385 insertions(+), 586 deletions(-) diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 51b8b66..759ab72 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "c110ce7bc8ad8473c735f8a2f8b4ca0f8bd4b315" + "sha1": "6bd40906acb8574a3a0bbadc7cf1349fadac7d3c" } } diff --git a/Android.bp b/Android.bp index ce669bd..ced2d94 100644 --- a/Android.bp +++ b/Android.bp @@ -51,8 +51,8 @@ rust_library { } // dependent_library ["feature_list"] -// pin-project-internal-1.0.7 -// proc-macro2-1.0.26 "default,proc-macro" +// pin-project-internal-1.0.8 +// proc-macro2-1.0.28 "default,proc-macro" // quote-1.0.9 "default,proc-macro" -// syn-1.0.72 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut" +// syn-1.0.74 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut" // unicode-xid-0.2.2 "default" diff --git a/CHANGELOG.md b/CHANGELOG.md index 75f1613..7568f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,13 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [Unreleased] +## [1.0.8] - 2021-07-21 + +- [Suppress `clippy::use_self` and `clippy::type_repetition_in_bounds` lints in generated code.](https://github.com/taiki-e/pin-project/pull/331) + ## [1.0.7] - 2021-04-16 -- Fix compile error when using `self::` as prefix of path inside `#[pinned_drop]` impl. +- [Fix compile error when using `self::` as prefix of path inside `#[pinned_drop]` impl.](https://github.com/taiki-e/pin-project/pull/326) ## [1.0.6] - 2021-03-25 @@ -598,7 +602,8 @@ See also [tracking issue for 0.4 release](https://github.com/taiki-e/pin-project Initial release -[Unreleased]: https://github.com/taiki-e/pin-project/compare/v1.0.7...HEAD +[Unreleased]: https://github.com/taiki-e/pin-project/compare/v1.0.8...HEAD +[1.0.8]: https://github.com/taiki-e/pin-project/compare/v1.0.7...v1.0.8 [1.0.7]: https://github.com/taiki-e/pin-project/compare/v1.0.6...v1.0.7 [1.0.6]: https://github.com/taiki-e/pin-project/compare/v1.0.5...v1.0.6 [1.0.5]: https://github.com/taiki-e/pin-project/compare/v1.0.4...v1.0.5 diff --git a/Cargo.toml b/Cargo.toml index 5947cc5..be5c598 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ [package] edition = "2018" name = "pin-project" -version = "1.0.7" +version = "1.0.8" authors = ["Taiki Endo "] exclude = ["/.*", "/ci", "/tools"] description = "A crate for safe and ergonomic pin-projection.\n" @@ -25,7 +25,7 @@ repository = "https://github.com/taiki-e/pin-project" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies.pin-project-internal] -version = "=1.0.7" +version = "=1.0.8" default-features = false [dev-dependencies.macrotest] version = "1.0.8" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 00291a7..6ba9e9b 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "pin-project" -version = "1.0.7" +version = "1.0.8" authors = ["Taiki Endo "] edition = "2018" license = "Apache-2.0 OR MIT" @@ -27,7 +27,7 @@ members = [ ] [dependencies] -pin-project-internal = { version = "=1.0.7", path = "pin-project-internal", default-features = false } +pin-project-internal = { version = "=1.0.8", path = "pin-project-internal", default-features = false } [dev-dependencies] pin-project-auxiliary-macro = { path = "tests/auxiliary/macro" } diff --git a/METADATA b/METADATA index 3a96d60..0e4271b 100644 --- a/METADATA +++ b/METADATA @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/pin-project/pin-project-1.0.7.crate" + value: "https://static.crates.io/crates/pin-project/pin-project-1.0.8.crate" } - version: "1.0.7" + version: "1.0.8" license_type: NOTICE last_upgrade_date { year: 2021 - month: 5 - day: 19 + month: 8 + day: 9 } } diff --git a/examples/enum-default-expanded.rs b/examples/enum-default-expanded.rs index 2153592..459ca39 100644 --- a/examples/enum-default-expanded.rs +++ b/examples/enum-default-expanded.rs @@ -15,7 +15,11 @@ // ``` #![allow(dead_code, unused_imports, unused_parens, unknown_lints, renamed_and_removed_lints)] -#![allow(clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +#![allow( + clippy::needless_lifetimes, + clippy::just_underscores_and_digits, + clippy::used_underscore_binding +)] use pin_project::pin_project; diff --git a/examples/pinned_drop-expanded.rs b/examples/pinned_drop-expanded.rs index 019f151..82207b6 100644 --- a/examples/pinned_drop-expanded.rs +++ b/examples/pinned_drop-expanded.rs @@ -23,7 +23,7 @@ // ``` #![allow(dead_code, unused_imports, unused_parens, unknown_lints, renamed_and_removed_lints)] -#![allow(clippy::needless_lifetimes)] +#![allow(clippy::needless_lifetimes, clippy::mut_mut)] use std::pin::Pin; diff --git a/src/lib.rs b/src/lib.rs index 2940f19..24a6c19 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,7 +75,7 @@ ) ))] #![warn(future_incompatible, missing_docs, rust_2018_idioms, single_use_lifetimes, unreachable_pub)] -#![warn(clippy::default_trait_access)] +#![warn(clippy::default_trait_access, clippy::wildcard_imports)] #![allow(clippy::needless_doctest_main)] // ANDROID: Use std to allow building as a dylib. diff --git a/tests/compiletest.rs b/tests/compiletest.rs index b06cb02..c1c6be0 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -3,7 +3,7 @@ use std::env; -#[rustversion::attr(before(2021-02-07), ignore)] // Note: This date is commit-date and the day before the toolchain date. +#[rustversion::attr(before(2021-07-19), ignore)] // Note: This date is commit-date and the day before the toolchain date. #[test] fn ui() { if env::var_os("CI").is_none() { diff --git a/tests/expand/default/enum.expanded.rs b/tests/expand/default/enum.expanded.rs index e042f8c..75ec2fe 100644 --- a/tests/expand/default/enum.expanded.rs +++ b/tests/expand/default/enum.expanded.rs @@ -17,9 +17,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProj<'pin, T, U> where Enum: 'pin, @@ -39,9 +39,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProjRef<'pin, T, U> where Enum: 'pin, @@ -61,7 +61,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/default/struct.expanded.rs b/tests/expand/default/struct.expanded.rs index 70f04ef..794675a 100644 --- a/tests/expand/default/struct.expanded.rs +++ b/tests/expand/default/struct.expanded.rs @@ -13,20 +13,13 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -34,17 +27,8 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/default/tuple_struct.expanded.rs b/tests/expand/default/tuple_struct.expanded.rs index 1322d22..6a3dfbf 100644 --- a/tests/expand/default/tuple_struct.expanded.rs +++ b/tests/expand/default/tuple_struct.expanded.rs @@ -9,37 +9,21 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), diff --git a/tests/expand/multifields/enum.expanded.rs b/tests/expand/multifields/enum.expanded.rs index 4c935d7..6ccbd9d 100644 --- a/tests/expand/multifields/enum.expanded.rs +++ b/tests/expand/multifields/enum.expanded.rs @@ -20,9 +20,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProj<'pin, T, U> where Enum: 'pin, @@ -49,9 +49,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProjRef<'pin, T, U> where Enum: 'pin, @@ -78,6 +78,7 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(variant_size_differences)] #[allow(clippy::large_enum_variant)] @@ -104,7 +105,9 @@ enum EnumProjOwn { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/multifields/struct.expanded.rs b/tests/expand/multifields/struct.expanded.rs index 1f7dfdd..7e3505b 100644 --- a/tests/expand/multifields/struct.expanded.rs +++ b/tests/expand/multifields/struct.expanded.rs @@ -16,20 +16,13 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -39,17 +32,8 @@ const _: () = { unpinned1: &'pin mut (U), unpinned2: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, @@ -59,14 +43,6 @@ const _: () = { unpinned1: &'pin (U), unpinned2: &'pin (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] struct __StructProjectionOwned { pinned1: ::pin_project::__private::PhantomData, diff --git a/tests/expand/multifields/tuple_struct.expanded.rs b/tests/expand/multifields/tuple_struct.expanded.rs index aef8f8d..7b47899 100644 --- a/tests/expand/multifields/tuple_struct.expanded.rs +++ b/tests/expand/multifields/tuple_struct.expanded.rs @@ -9,20 +9,13 @@ struct TupleStruct(#[pin] T, #[pin] T, U, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, ::pin_project::__private::Pin<&'pin mut (T)>, @@ -31,17 +24,8 @@ const _: () = { ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, ::pin_project::__private::Pin<&'pin (T)>, @@ -50,14 +34,6 @@ const _: () = { ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] struct __TupleStructProjectionOwned( ::pin_project::__private::PhantomData, diff --git a/tests/expand/naming/enum-all.expanded.rs b/tests/expand/naming/enum-all.expanded.rs index 561bb89..21c1c59 100644 --- a/tests/expand/naming/enum-all.expanded.rs +++ b/tests/expand/naming/enum-all.expanded.rs @@ -17,9 +17,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] enum Proj<'pin, T, U> where Enum: 'pin, @@ -39,9 +39,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] enum ProjRef<'pin, T, U> where Enum: 'pin, @@ -61,6 +61,7 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(variant_size_differences)] #[allow(clippy::large_enum_variant)] @@ -80,7 +81,9 @@ enum ProjOwn { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/naming/enum-mut.expanded.rs b/tests/expand/naming/enum-mut.expanded.rs index 3489c6e..7324372 100644 --- a/tests/expand/naming/enum-mut.expanded.rs +++ b/tests/expand/naming/enum-mut.expanded.rs @@ -17,9 +17,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] enum Proj<'pin, T, U> where Enum: 'pin, @@ -39,7 +39,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/naming/enum-none.expanded.rs b/tests/expand/naming/enum-none.expanded.rs index a33491e..3410001 100644 --- a/tests/expand/naming/enum-none.expanded.rs +++ b/tests/expand/naming/enum-none.expanded.rs @@ -17,7 +17,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum {} diff --git a/tests/expand/naming/enum-own.expanded.rs b/tests/expand/naming/enum-own.expanded.rs index 6ca558b..a63a874 100644 --- a/tests/expand/naming/enum-own.expanded.rs +++ b/tests/expand/naming/enum-own.expanded.rs @@ -17,6 +17,7 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(variant_size_differences)] #[allow(clippy::large_enum_variant)] @@ -36,7 +37,9 @@ enum ProjOwn { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/naming/enum-ref.expanded.rs b/tests/expand/naming/enum-ref.expanded.rs index 0dcb829..6197557 100644 --- a/tests/expand/naming/enum-ref.expanded.rs +++ b/tests/expand/naming/enum-ref.expanded.rs @@ -17,9 +17,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] enum ProjRef<'pin, T, U> where Enum: 'pin, @@ -39,7 +39,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/naming/struct-all.expanded.rs b/tests/expand/naming/struct-all.expanded.rs index 88e024c..54b63f5 100644 --- a/tests/expand/naming/struct-all.expanded.rs +++ b/tests/expand/naming/struct-all.expanded.rs @@ -13,9 +13,9 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] struct Proj<'pin, T, U> where Struct: 'pin, @@ -31,9 +31,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] struct ProjRef<'pin, T, U> where Struct: 'pin, @@ -49,6 +49,7 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] struct ProjOwn { pinned: ::pin_project::__private::PhantomData, @@ -62,7 +63,9 @@ struct ProjOwn { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Struct { diff --git a/tests/expand/naming/struct-mut.expanded.rs b/tests/expand/naming/struct-mut.expanded.rs index 1365b23..ee641d6 100644 --- a/tests/expand/naming/struct-mut.expanded.rs +++ b/tests/expand/naming/struct-mut.expanded.rs @@ -13,9 +13,9 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] struct Proj<'pin, T, U> where Struct: 'pin, @@ -31,20 +31,13 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/naming/struct-none.expanded.rs b/tests/expand/naming/struct-none.expanded.rs index 70f04ef..794675a 100644 --- a/tests/expand/naming/struct-none.expanded.rs +++ b/tests/expand/naming/struct-none.expanded.rs @@ -13,20 +13,13 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -34,17 +27,8 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/naming/struct-own.expanded.rs b/tests/expand/naming/struct-own.expanded.rs index 899166f..2853838 100644 --- a/tests/expand/naming/struct-own.expanded.rs +++ b/tests/expand/naming/struct-own.expanded.rs @@ -13,6 +13,7 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] struct ProjOwn { pinned: ::pin_project::__private::PhantomData, @@ -26,20 +27,13 @@ struct ProjOwn { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -47,17 +41,8 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/naming/struct-ref.expanded.rs b/tests/expand/naming/struct-ref.expanded.rs index f636f10..baee324 100644 --- a/tests/expand/naming/struct-ref.expanded.rs +++ b/tests/expand/naming/struct-ref.expanded.rs @@ -13,9 +13,9 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] struct ProjRef<'pin, T, U> where Struct: 'pin, @@ -31,20 +31,13 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/naming/tuple_struct-all.expanded.rs b/tests/expand/naming/tuple_struct-all.expanded.rs index e4032be..125d483 100644 --- a/tests/expand/naming/tuple_struct-all.expanded.rs +++ b/tests/expand/naming/tuple_struct-all.expanded.rs @@ -9,9 +9,9 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] struct Proj<'pin, T, U>(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U)) where TupleStruct: 'pin; @@ -23,9 +23,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] struct ProjRef<'pin, T, U>(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)) where TupleStruct: 'pin; @@ -37,6 +37,7 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] struct ProjOwn(::pin_project::__private::PhantomData, U); #[allow(box_pointers)] @@ -47,7 +48,9 @@ struct ProjOwn(::pin_project::__private::PhantomData, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl TupleStruct { diff --git a/tests/expand/naming/tuple_struct-mut.expanded.rs b/tests/expand/naming/tuple_struct-mut.expanded.rs index 076e4a0..f7daaff 100644 --- a/tests/expand/naming/tuple_struct-mut.expanded.rs +++ b/tests/expand/naming/tuple_struct-mut.expanded.rs @@ -9,9 +9,9 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] struct Proj<'pin, T, U>(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U)) where TupleStruct: 'pin; @@ -23,20 +23,13 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), diff --git a/tests/expand/naming/tuple_struct-none.expanded.rs b/tests/expand/naming/tuple_struct-none.expanded.rs index 1322d22..6a3dfbf 100644 --- a/tests/expand/naming/tuple_struct-none.expanded.rs +++ b/tests/expand/naming/tuple_struct-none.expanded.rs @@ -9,37 +9,21 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), diff --git a/tests/expand/naming/tuple_struct-own.expanded.rs b/tests/expand/naming/tuple_struct-own.expanded.rs index eda8267..5f18045 100644 --- a/tests/expand/naming/tuple_struct-own.expanded.rs +++ b/tests/expand/naming/tuple_struct-own.expanded.rs @@ -9,6 +9,7 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] struct ProjOwn(::pin_project::__private::PhantomData, U); #[allow(box_pointers)] @@ -19,37 +20,21 @@ struct ProjOwn(::pin_project::__private::PhantomData, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), diff --git a/tests/expand/naming/tuple_struct-ref.expanded.rs b/tests/expand/naming/tuple_struct-ref.expanded.rs index 3c2618f..d8d5008 100644 --- a/tests/expand/naming/tuple_struct-ref.expanded.rs +++ b/tests/expand/naming/tuple_struct-ref.expanded.rs @@ -9,9 +9,9 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] struct ProjRef<'pin, T, U>(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)) where TupleStruct: 'pin; @@ -23,20 +23,13 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), diff --git a/tests/expand/not_unpin/enum.expanded.rs b/tests/expand/not_unpin/enum.expanded.rs index 6305b78..3414a10 100644 --- a/tests/expand/not_unpin/enum.expanded.rs +++ b/tests/expand/not_unpin/enum.expanded.rs @@ -17,9 +17,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProj<'pin, T, U> where Enum: 'pin, @@ -39,9 +39,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProjRef<'pin, T, U> where Enum: 'pin, @@ -61,7 +61,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/not_unpin/struct.expanded.rs b/tests/expand/not_unpin/struct.expanded.rs index 680fb03..b701af5 100644 --- a/tests/expand/not_unpin/struct.expanded.rs +++ b/tests/expand/not_unpin/struct.expanded.rs @@ -13,20 +13,13 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -34,17 +27,8 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/not_unpin/tuple_struct.expanded.rs b/tests/expand/not_unpin/tuple_struct.expanded.rs index 8bc6bbc..4b73483 100644 --- a/tests/expand/not_unpin/tuple_struct.expanded.rs +++ b/tests/expand/not_unpin/tuple_struct.expanded.rs @@ -9,37 +9,21 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), diff --git a/tests/expand/pinned_drop/enum.expanded.rs b/tests/expand/pinned_drop/enum.expanded.rs index 6e6ed54..a968b72 100644 --- a/tests/expand/pinned_drop/enum.expanded.rs +++ b/tests/expand/pinned_drop/enum.expanded.rs @@ -18,9 +18,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProj<'pin, T, U> where Enum: 'pin, @@ -40,9 +40,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProjRef<'pin, T, U> where Enum: 'pin, @@ -62,7 +62,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/pinned_drop/struct.expanded.rs b/tests/expand/pinned_drop/struct.expanded.rs index 10ca8c1..630389b 100644 --- a/tests/expand/pinned_drop/struct.expanded.rs +++ b/tests/expand/pinned_drop/struct.expanded.rs @@ -14,20 +14,13 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -35,17 +28,8 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/pinned_drop/tuple_struct.expanded.rs b/tests/expand/pinned_drop/tuple_struct.expanded.rs index 506726c..f06f2ae 100644 --- a/tests/expand/pinned_drop/tuple_struct.expanded.rs +++ b/tests/expand/pinned_drop/tuple_struct.expanded.rs @@ -10,37 +10,21 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), diff --git a/tests/expand/project_replace/enum.expanded.rs b/tests/expand/project_replace/enum.expanded.rs index 304e0a7..27ff08a 100644 --- a/tests/expand/project_replace/enum.expanded.rs +++ b/tests/expand/project_replace/enum.expanded.rs @@ -17,6 +17,7 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(variant_size_differences)] #[allow(clippy::large_enum_variant)] @@ -36,7 +37,9 @@ enum EnumProjOwn { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/project_replace/struct.expanded.rs b/tests/expand/project_replace/struct.expanded.rs index d3ed9e4..bad4984 100644 --- a/tests/expand/project_replace/struct.expanded.rs +++ b/tests/expand/project_replace/struct.expanded.rs @@ -13,20 +13,13 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -34,17 +27,8 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, @@ -52,14 +36,6 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin (T)>, unpinned: &'pin (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] struct __StructProjectionOwned { pinned: ::pin_project::__private::PhantomData, diff --git a/tests/expand/project_replace/tuple_struct.expanded.rs b/tests/expand/project_replace/tuple_struct.expanded.rs index 91077f3..bc5a6e5 100644 --- a/tests/expand/project_replace/tuple_struct.expanded.rs +++ b/tests/expand/project_replace/tuple_struct.expanded.rs @@ -9,51 +9,27 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] struct __TupleStructProjectionOwned(::pin_project::__private::PhantomData, U); impl TupleStruct { diff --git a/tests/expand/pub/enum.expanded.rs b/tests/expand/pub/enum.expanded.rs index 5026bad..f9bd9fe 100644 --- a/tests/expand/pub/enum.expanded.rs +++ b/tests/expand/pub/enum.expanded.rs @@ -17,9 +17,9 @@ pub enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] pub(crate) enum EnumProj<'pin, T, U> where Enum: 'pin, @@ -39,9 +39,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] pub(crate) enum EnumProjRef<'pin, T, U> where Enum: 'pin, @@ -61,7 +61,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/pub/struct.expanded.rs b/tests/expand/pub/struct.expanded.rs index 7e6b975..8abd9a1 100644 --- a/tests/expand/pub/struct.expanded.rs +++ b/tests/expand/pub/struct.expanded.rs @@ -13,20 +13,13 @@ pub struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] pub(crate) struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -34,17 +27,8 @@ const _: () = { pub pinned: ::pin_project::__private::Pin<&'pin mut (T)>, pub unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] pub(crate) struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/pub/tuple_struct.expanded.rs b/tests/expand/pub/tuple_struct.expanded.rs index 48355e3..2641d16 100644 --- a/tests/expand/pub/tuple_struct.expanded.rs +++ b/tests/expand/pub/tuple_struct.expanded.rs @@ -9,37 +9,21 @@ pub struct TupleStruct(#[pin] pub T, pub U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] pub(crate) struct __TupleStructProjection<'pin, T, U>( pub ::pin_project::__private::Pin<&'pin mut (T)>, pub &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] pub(crate) struct __TupleStructProjectionRef<'pin, T, U>( pub ::pin_project::__private::Pin<&'pin (T)>, pub &'pin (U), diff --git a/tests/expand/unsafe_unpin/enum.expanded.rs b/tests/expand/unsafe_unpin/enum.expanded.rs index df962d0..1c51df0 100644 --- a/tests/expand/unsafe_unpin/enum.expanded.rs +++ b/tests/expand/unsafe_unpin/enum.expanded.rs @@ -17,9 +17,9 @@ enum Enum { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::mut_mut)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProj<'pin, T, U> where Enum: 'pin, @@ -39,9 +39,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] -#[allow(clippy::type_repetition_in_bounds)] enum EnumProjRef<'pin, T, U> where Enum: 'pin, @@ -61,7 +61,9 @@ where #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { diff --git a/tests/expand/unsafe_unpin/struct.expanded.rs b/tests/expand/unsafe_unpin/struct.expanded.rs index 76f4e52..67ede39 100644 --- a/tests/expand/unsafe_unpin/struct.expanded.rs +++ b/tests/expand/unsafe_unpin/struct.expanded.rs @@ -13,20 +13,13 @@ struct Struct { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjection<'pin, T, U> where Struct: 'pin, @@ -34,17 +27,8 @@ const _: () = { pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __StructProjectionRef<'pin, T, U> where Struct: 'pin, diff --git a/tests/expand/unsafe_unpin/tuple_struct.expanded.rs b/tests/expand/unsafe_unpin/tuple_struct.expanded.rs index a0a52a8..512f139 100644 --- a/tests/expand/unsafe_unpin/tuple_struct.expanded.rs +++ b/tests/expand/unsafe_unpin/tuple_struct.expanded.rs @@ -9,37 +9,21 @@ struct TupleStruct(#[pin] T, U); #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] +#[allow(clippy::type_repetition_in_bounds)] #[allow(clippy::semicolon_if_nothing_returned)] +#[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::mut_mut)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjection<'pin, T, U>( ::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U), ) where TupleStruct: 'pin; - #[allow(box_pointers)] - #[allow(deprecated)] - #[allow(explicit_outlives_requirements)] - #[allow(single_use_lifetimes)] - #[allow(unreachable_pub)] - #[allow(clippy::unknown_clippy_lints)] - #[allow(clippy::pattern_type_mismatch)] - #[allow(clippy::redundant_pub_crate)] #[allow(dead_code)] #[allow(clippy::ref_option_ref)] - #[allow(clippy::type_repetition_in_bounds)] struct __TupleStructProjectionRef<'pin, T, U>( ::pin_project::__private::Pin<&'pin (T)>, &'pin (U), diff --git a/tests/expandtest.rs b/tests/expandtest.rs index 4e08040..3f0d5c1 100644 --- a/tests/expandtest.rs +++ b/tests/expandtest.rs @@ -15,7 +15,7 @@ fn expandtest() { let cargo = &*env::var("CARGO").unwrap_or_else(|_| "cargo".into()); if !has_command(&[cargo, "expand"]) || !has_command(&[cargo, "fmt"]) { if is_ci { - panic!("expandtest requires rustfmt and cargo-expand") + panic!("expandtest requires rustfmt and cargo-expand"); } return; } diff --git a/tests/lint.rs b/tests/lint.rs index 4820816..5cdd2c6 100644 --- a/tests/lint.rs +++ b/tests/lint.rs @@ -1,14 +1,20 @@ +// Check interoperability with rustc and clippy lints. + +// for old compilers +#![allow(unknown_lints)] #![warn(nonstandard_style, rust_2018_idioms, unused)] // Note: This does not guarantee compatibility with forbidding these lints in the future. // If rustc adds a new lint, we may not be able to keep this. -#![forbid(future_incompatible, rust_2018_compatibility)] -#![allow(unknown_lints)] // for old compilers +#![forbid(future_incompatible, rust_2018_compatibility, rust_2021_compatibility)] +// lints forbidden as a part of future_incompatible, rust_2018_compatibility, and rust_2021_compatibility are not included in the list below. +// elided_lifetimes_in_paths, explicit_outlives_requirements, unused_extern_crates: as a part of rust_2018_idioms +// unsafe_block_in_unsafe_fn: unsafe_block_in_unsafe_fn: requires Rust 1.52. and, we don't generate unsafe fn. +// unstable_features: no way to generate #![feature(..)] by macros, expect for unstable inner attribute. and this lint is deprecated: https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unstable-features +// unused_crate_dependencies: unrelated +// unsafe_code: checked in forbid_unsafe module #![warn( box_pointers, deprecated_in_future, - disjoint_capture_drop_reorder, - elided_lifetimes_in_paths, - explicit_outlives_requirements, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -17,30 +23,20 @@ missing_docs, non_ascii_idents, noop_method_call, - or_patterns_back_compat, single_use_lifetimes, trivial_casts, trivial_numeric_casts, unreachable_pub, - unused_extern_crates, unused_import_braces, unused_lifetimes, unused_qualifications, unused_results, variant_size_differences )] -// absolute_paths_not_starting_with_crate, anonymous_parameters, keyword_idents, pointer_structural_match, semicolon_in_expressions_from_macros: forbidden as a part of future_incompatible -// unsafe_block_in_unsafe_fn: unstable: https://github.com/rust-lang/rust/issues/71668 -// unsafe_code: checked in forbid_unsafe module -// unstable_features: deprecated: https://doc.rust-lang.org/beta/rustc/lints/listing/allowed-by-default.html#unstable-features -// unused_crate_dependencies: unrelated -#![warn(clippy::all, clippy::pedantic, clippy::nursery)] -#![warn(clippy::restriction)] +#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::restriction)] #![allow(clippy::blanket_clippy_restriction_lints)] // this is a test, so enable all restriction lints intentionally. #![allow(clippy::exhaustive_structs, clippy::exhaustive_enums)] // TODO -// Check interoperability with rustc and clippy lints. - pub mod basic { include!("include/basic.rs"); @@ -1081,6 +1077,45 @@ pub mod clippy_type_repetition_in_bounds { } } +pub mod clippy_use_self { + use pin_project::pin_project; + + pub trait Trait { + type Assoc; + } + + #[pin_project(project_replace)] + #[derive(Debug)] + pub struct Generics> + where + Self: Trait, + { + _f: T, + } + + pub mod inside_macro { + use pin_project::pin_project; + + use super::Trait; + + #[rustfmt::skip] + macro_rules! mac { + () => { + #[pin_project(project_replace)] + #[derive(Debug)] + pub struct Generics> + where + Self: Trait, + { + _f: T, + } + }; + } + + mac!(); + } +} + pub mod clippy_used_underscore_binding { use pin_project::pin_project; diff --git a/tests/pin_project.rs b/tests/pin_project.rs index c6aaf94..aa08056 100644 --- a/tests/pin_project.rs +++ b/tests/pin_project.rs @@ -94,7 +94,7 @@ fn projection() { EnumProj::Struct { f1, f2 } => { let _: Pin<&mut i32> = f1; let _: &mut i32 = f2; - unreachable!() + unreachable!(); } EnumProj::Unit => unreachable!(), } @@ -108,7 +108,7 @@ fn projection() { EnumProj::Tuple(x, y) => { let _: Pin<&mut i32> = x; let _: &mut i32 = y; - unreachable!() + unreachable!(); } EnumProj::Struct { f1, f2 } => { let _: Pin<&mut i32> = f1; @@ -723,6 +723,7 @@ fn parse_self() { type Assoc; } + #[allow(clippy::type_repetition_in_bounds)] #[pin_project(project_replace)] pub struct Generics> where @@ -846,7 +847,7 @@ fn project_replace_panic() { fn drop(&mut self) { *self.0 = true; if self.1 { - panic!() + panic!(); } } } diff --git a/tests/pinned_drop.rs b/tests/pinned_drop.rs index 785cea3..99273c4 100644 --- a/tests/pinned_drop.rs +++ b/tests/pinned_drop.rs @@ -70,10 +70,10 @@ fn self_ty() { // pat match *self { - Self { f: _ } => {} + Self { f: () } => {} } - if let Self { f: _ } = *self {} - let Self { f: _ } = *self; + if let Self { f: () } = *self {} + let Self { f: () } = *self; } } @@ -113,11 +113,11 @@ fn self_ty() { // pat match *self { - Self::Struct { f: _ } => {} + Self::Struct { f: () } => {} Self::Tuple(_) => {} Self::Unit => {} } - if let Self::Struct { f: _ } = *self {} + if let Self::Struct { f: () } = *self {} if let Self::Tuple(_) = *self {} if let Self::Unit = *self {} } @@ -138,7 +138,7 @@ fn self_inside_macro_containing_fn() { #[pinned_drop] impl PinnedDrop for S { fn drop(self: Pin<&mut Self>) { - let _ = mac!({ + mac!({ impl S { pub fn _f(self) -> Self { self @@ -213,7 +213,7 @@ fn self_ty_inside_macro_call() { } impl Trait for Struct { - type Assoc2 = (); + type Assoc2 = u8; const ASSOC2: usize = 2; fn assoc2() {} } diff --git a/tests/repr_packed.rs b/tests/repr_packed.rs index e87aabf..be7cab9 100644 --- a/tests/repr_packed.rs +++ b/tests/repr_packed.rs @@ -33,7 +33,7 @@ fn weird_repr_packed() { fn drop(&mut self) { FIELD_ADDR.with(|f| { f.set(&self.field as *const u8 as usize); - }) + }); } } @@ -48,5 +48,5 @@ fn weird_repr_packed() { let field_addr = &x.field as *const u8 as usize; field_addr }; - assert_eq!(field_addr, FIELD_ADDR.with(|f| f.get())); + assert_eq!(field_addr, FIELD_ADDR.with(Cell::get)); } diff --git a/tests/ui/not_unpin/impl-unsafe-unpin.stderr b/tests/ui/not_unpin/impl-unsafe-unpin.stderr index 43cd4f1..7051bd8 100644 --- a/tests/ui/not_unpin/impl-unsafe-unpin.stderr +++ b/tests/ui/not_unpin/impl-unsafe-unpin.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 10 | unsafe impl UnsafeUnpin for Foo where T: Unpin {} | ---------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Bar<_, _>` --> $DIR/impl-unsafe-unpin.rs:12:1 @@ -18,7 +18,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 19 | unsafe impl UnsafeUnpin for Bar {} | ------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Baz<_, _>` --> $DIR/impl-unsafe-unpin.rs:21:1 @@ -29,4 +29,4 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 28 | unsafe impl UnsafeUnpin for Baz {} | --------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/add-attr-to-struct.stderr b/tests/ui/pin_project/add-attr-to-struct.stderr index f3ee9e4..b28559b 100644 --- a/tests/ui/pin_project/add-attr-to-struct.stderr +++ b/tests/ui/pin_project/add-attr-to-struct.stderr @@ -4,7 +4,7 @@ error: duplicate #[pin] attribute 7 | #[add_pin_attr(struct)] //~ ERROR duplicate #[pin] attribute | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `add_pin_attr` (in Nightly builds, run with -Z macro-backtrace for more info) error: #[pin] attribute may only be used on fields of structs or variants --> $DIR/add-attr-to-struct.rs:13:1 @@ -12,4 +12,4 @@ error: #[pin] attribute may only be used on fields of structs or variants 13 | #[add_pin_attr(struct)] //~ ERROR #[pin] attribute may only be used on fields of structs or variants | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `add_pin_attr` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/add-pinned-field.stderr b/tests/ui/pin_project/add-pinned-field.stderr index a391f3b..bdeafb8 100644 --- a/tests/ui/pin_project/add-pinned-field.stderr +++ b/tests/ui/pin_project/add-pinned-field.stderr @@ -13,7 +13,15 @@ note: required because it appears within the type `__Foo<'_>` | 8 | struct Foo { | ^^^ - = note: required because of the requirements on the impl of `Unpin` for `Foo` +note: required because of the requirements on the impl of `Unpin` for `Foo` + --> $DIR/add-pinned-field.rs:6:1 + | +6 | #[pin_project] + | ^^^^^^^^^^^^^^ +7 | #[add_pinned_field] +8 | struct Foo { + | ^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `PhantomPinned` cannot be unpinned --> $DIR/add-pinned-field.rs:22:5 @@ -30,4 +38,11 @@ note: required because it appears within the type `__Bar<'_>` | 15 | struct Bar { | ^^^ - = note: required because of the requirements on the impl of `Unpin` for `Bar` +note: required because of the requirements on the impl of `Unpin` for `Bar` + --> $DIR/add-pinned-field.rs:14:1 + | +14 | #[pin_project] + | ^^^^^^^^^^^^^^ +15 | struct Bar { + | ^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/conflict-drop.stderr b/tests/ui/pin_project/conflict-drop.stderr index ae51456..25b0e00 100644 --- a/tests/ui/pin_project/conflict-drop.stderr +++ b/tests/ui/pin_project/conflict-drop.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `_::FooMustNotImplDrop` for t | first implementation here | conflicting implementation for `Foo<_, _>` | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `Bar<_, _>` --> $DIR/conflict-drop.rs:16:15 diff --git a/tests/ui/pin_project/conflict-unpin.stderr b/tests/ui/pin_project/conflict-unpin.stderr index 0401140..5a16469 100644 --- a/tests/ui/pin_project/conflict-unpin.stderr +++ b/tests/ui/pin_project/conflict-unpin.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 13 | impl Unpin for Foo where T: Unpin {} // Conditional Unpin impl | --------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Bar<_, _>` --> $DIR/conflict-unpin.rs:17:1 @@ -18,7 +18,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 25 | impl Unpin for Bar {} // Non-conditional Unpin impl | ------------------------------ first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Baz<_, _>` --> $DIR/conflict-unpin.rs:27:1 @@ -29,4 +29,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 35 | impl Unpin for Baz {} // Conditional Unpin impl | -------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/impl-unsafe-unpin.stderr b/tests/ui/pin_project/impl-unsafe-unpin.stderr index 078baee..e97d31b 100644 --- a/tests/ui/pin_project/impl-unsafe-unpin.stderr +++ b/tests/ui/pin_project/impl-unsafe-unpin.stderr @@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 10 | unsafe impl UnsafeUnpin for Foo where T: Unpin {} | ---------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Bar<_, _>` --> $DIR/impl-unsafe-unpin.rs:12:1 @@ -18,7 +18,7 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 19 | unsafe impl UnsafeUnpin for Bar {} | ------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` for type `Baz<_, _>` --> $DIR/impl-unsafe-unpin.rs:21:1 @@ -29,4 +29,4 @@ error[E0119]: conflicting implementations of trait `pin_project::UnsafeUnpin` fo 28 | unsafe impl UnsafeUnpin for Baz {} | --------------------------------------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/overlapping_unpin_struct.stderr b/tests/ui/pin_project/overlapping_unpin_struct.stderr index f49c736..bb33944 100644 --- a/tests/ui/pin_project/overlapping_unpin_struct.stderr +++ b/tests/ui/pin_project/overlapping_unpin_struct.stderr @@ -13,4 +13,11 @@ note: required because it appears within the type `_::__S<'_, PhantomPinned>` | 6 | struct S { | ^ - = note: required because of the requirements on the impl of `Unpin` for `S` +note: required because of the requirements on the impl of `Unpin` for `S` + --> $DIR/overlapping_unpin_struct.rs:5:1 + | +5 | #[pin_project] + | ^^^^^^^^^^^^^^ +6 | struct S { + | ^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/packed-name-value.stderr b/tests/ui/pin_project/packed-name-value.stderr index 51b82dd..18137d4 100644 --- a/tests/ui/pin_project/packed-name-value.stderr +++ b/tests/ui/pin_project/packed-name-value.stderr @@ -9,3 +9,15 @@ error: #[repr(packed)] attribute should not be name-value pair | 21 | #[repr(packed = "")] //~ ERROR attribute should not be name-value pair | ^^^^^^^^^^^ + +error[E0693]: incorrect `repr(packed)` attribute format + --> $DIR/packed-name-value.rs:16:8 + | +16 | #[repr(packed = "")] //~ ERROR attribute should not be name-value pair + | ^^^^^^^^^^^ help: use parentheses instead: `packed()` + +error[E0693]: incorrect `repr(packed)` attribute format + --> $DIR/packed-name-value.rs:21:8 + | +21 | #[repr(packed = "")] //~ ERROR attribute should not be name-value pair + | ^^^^^^^^^^^ help: use parentheses instead: `packed()` diff --git a/tests/ui/pin_project/packed_sneaky-2.stderr b/tests/ui/pin_project/packed_sneaky-2.stderr index 51987a2..04d072a 100644 --- a/tests/ui/pin_project/packed_sneaky-2.stderr +++ b/tests/ui/pin_project/packed_sneaky-2.stderr @@ -10,4 +10,4 @@ error: #[pin_project] attribute may not be used on #[repr(packed)] types 10 | | } | |_^ | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `hidden_repr_macro` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/packed_sneaky-3.stderr b/tests/ui/pin_project/packed_sneaky-3.stderr index b953e9f..1a5a3ec 100644 --- a/tests/ui/pin_project/packed_sneaky-3.stderr +++ b/tests/ui/pin_project/packed_sneaky-3.stderr @@ -4,7 +4,7 @@ error: expected item after attributes 4 | hidden_repr_macro! {} //~ ERROR expected item after attributes | ^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `hidden_repr_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected item after attributes --> $DIR/packed_sneaky-3.rs:13:9 @@ -15,7 +15,7 @@ error: expected item after attributes 17 | hidden_repr_macro2! {} | ---------------------- in this macro invocation | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `hidden_repr_macro2` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected item after attributes --> $DIR/packed_sneaky-3.rs:24:10 @@ -23,7 +23,7 @@ error: expected item after attributes 24 | #[derive(HiddenRepr)] //~ ERROR expected item after attributes | ^^^^^^^^^^ | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `HiddenRepr` (in Nightly builds, run with -Z macro-backtrace for more info) error: proc-macro derive produced unparseable tokens --> $DIR/packed_sneaky-3.rs:24:10 diff --git a/tests/ui/pin_project/project_replace_unsized.stderr b/tests/ui/pin_project/project_replace_unsized.stderr index 75a2666..d20d858 100644 --- a/tests/ui/pin_project/project_replace_unsized.stderr +++ b/tests/ui/pin_project/project_replace_unsized.stderr @@ -18,20 +18,24 @@ help: function arguments must have a statically known size, borrowed types alway | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized.rs:3:1 - | -3 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -4 | struct Struct { - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized.rs:3:1 + | +3 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +4 | struct Struct { + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `Struct` - --> $DIR/project_replace_unsized.rs:4:8 - | -4 | struct Struct { - | ^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized.rs:4:8 + | +4 | struct Struct { + | ^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:5:5 @@ -61,20 +65,24 @@ help: function arguments must have a statically known size, borrowed types alway | ^ error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized.rs:8:1 - | -8 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -9 | struct TupleStruct(T); - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized.rs:8:1 + | +8 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +9 | struct TupleStruct(T); + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `TupleStruct` - --> $DIR/project_replace_unsized.rs:9:8 - | -9 | struct TupleStruct(T); - | ^^^^^^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized.rs:9:8 + | +9 | struct TupleStruct(T); + | ^^^^^^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized.rs:9:8 diff --git a/tests/ui/pin_project/project_replace_unsized_fn_params.stderr b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr index f8cee98..8ac4ad7 100644 --- a/tests/ui/pin_project/project_replace_unsized_fn_params.stderr +++ b/tests/ui/pin_project/project_replace_unsized_fn_params.stderr @@ -15,20 +15,24 @@ note: required because it appears within the type `__StructProjectionOwned` = note: the return type of a function must have a statically known size error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:5:1 - | -5 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -6 | struct Struct { - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized_fn_params.rs:5:1 + | +5 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +6 | struct Struct { + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `Struct` - --> $DIR/project_replace_unsized_fn_params.rs:6:8 - | -6 | struct Struct { - | ^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized_fn_params.rs:6:8 + | +6 | struct Struct { + | ^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/project_replace_unsized_fn_params.rs:7:5 @@ -55,17 +59,21 @@ note: required because it appears within the type `__TupleStructProjectionOwned< = note: the return type of a function must have a statically known size error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/project_replace_unsized_fn_params.rs:10:1 - | -10 | #[pin_project(project_replace)] //~ ERROR E0277 - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time -11 | struct TupleStruct(T); - | - this type parameter needs to be `std::marker::Sized` - | + --> $DIR/project_replace_unsized_fn_params.rs:10:1 + | +10 | #[pin_project(project_replace)] //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time +11 | struct TupleStruct(T); + | - this type parameter needs to be `std::marker::Sized` + | note: required because it appears within the type `TupleStruct` - --> $DIR/project_replace_unsized_fn_params.rs:11:8 - | -11 | struct TupleStruct(T); - | ^^^^^^^^^^^ - = note: required by `UnsafeOverwriteGuard` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + --> $DIR/project_replace_unsized_fn_params.rs:11:8 + | +11 | struct TupleStruct(T); + | ^^^^^^^^^^^ +note: required by `UnsafeOverwriteGuard` + --> $DIR/lib.rs:269:5 + | +269 | pub struct UnsafeOverwriteGuard { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pin_project/remove-attr-from-struct.stderr b/tests/ui/pin_project/remove-attr-from-struct.stderr index 82fada5..57cf21d 100644 --- a/tests/ui/pin_project/remove-attr-from-struct.stderr +++ b/tests/ui/pin_project/remove-attr-from-struct.stderr @@ -4,7 +4,7 @@ error: #[pin_project] attribute has been removed 22 | #[pin_project] //~ ERROR has been removed | ^^^^^^^^^^^^^^ | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find attribute `pin` in this scope --> $DIR/remove-attr-from-struct.rs:18:7 @@ -51,18 +51,18 @@ note: required because it appears within the type `B` | ^ error[E0277]: `PhantomPinned` cannot be unpinned - --> $DIR/remove-attr-from-struct.rs:40:13 - | -40 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 - | ^^^^^^^^ within `A`, the trait `Unpin` is not implemented for `PhantomPinned` - | - = note: consider using `Box::pin` + --> $DIR/remove-attr-from-struct.rs:40:13 + | +40 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 + | ^^^^^^^^ within `A`, the trait `Unpin` is not implemented for `PhantomPinned` + | + = note: consider using `Box::pin` note: required because it appears within the type `A` - --> $DIR/remove-attr-from-struct.rs:10:8 - | -10 | struct A { - | ^ - = note: required by `Pin::

::new` + --> $DIR/remove-attr-from-struct.rs:10:8 + | +10 | struct A { + | ^ +note: required by `Pin::

::new` error[E0599]: no method named `project` found for struct `Pin<&mut A>` in the current scope --> $DIR/remove-attr-from-struct.rs:40:30 @@ -71,18 +71,18 @@ error[E0599]: no method named `project` found for struct `Pin<&mut A>` in the cu | ^^^^^^^ method not found in `Pin<&mut A>` error[E0277]: `PhantomPinned` cannot be unpinned - --> $DIR/remove-attr-from-struct.rs:43:13 - | -43 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 - | ^^^^^^^^ within `B`, the trait `Unpin` is not implemented for `PhantomPinned` - | - = note: consider using `Box::pin` + --> $DIR/remove-attr-from-struct.rs:43:13 + | +43 | let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 + | ^^^^^^^^ within `B`, the trait `Unpin` is not implemented for `PhantomPinned` + | + = note: consider using `Box::pin` note: required because it appears within the type `B` - --> $DIR/remove-attr-from-struct.rs:17:8 - | -17 | struct B { - | ^ - = note: required by `Pin::

::new` + --> $DIR/remove-attr-from-struct.rs:17:8 + | +17 | struct B { + | ^ +note: required by `Pin::

::new` error[E0599]: no method named `project` found for struct `Pin<&mut B>` in the current scope --> $DIR/remove-attr-from-struct.rs:43:30 diff --git a/tests/ui/pinned_drop/call-drop-inner.stderr b/tests/ui/pinned_drop/call-drop-inner.stderr index 463e837..8fbe2dc 100644 --- a/tests/ui/pinned_drop/call-drop-inner.stderr +++ b/tests/ui/pinned_drop/call-drop-inner.stderr @@ -11,4 +11,4 @@ note: function defined here | 10 | #[pinned_drop] | ^^^^^^^^^^^^^^ - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `pinned_drop` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/pinned_drop/conditional-drop-impl.stderr b/tests/ui/pinned_drop/conditional-drop-impl.stderr index 8ab2294..a512578 100644 --- a/tests/ui/pinned_drop/conditional-drop-impl.stderr +++ b/tests/ui/pinned_drop/conditional-drop-impl.stderr @@ -13,19 +13,23 @@ note: the implementor must specify the same requirement | |_^ error[E0277]: `T` cannot be unpinned - --> $DIR/conditional-drop-impl.rs:16:15 - | -16 | #[pin_project(PinnedDrop)] //~ ERROR E0277 - | ^^^^^^^^^^ the trait `Unpin` is not implemented for `T` - | - = note: consider using `Box::pin` + --> $DIR/conditional-drop-impl.rs:16:15 + | +16 | #[pin_project(PinnedDrop)] //~ ERROR E0277 + | ^^^^^^^^^^ the trait `Unpin` is not implemented for `T` + | + = note: consider using `Box::pin` note: required because of the requirements on the impl of `PinnedDrop` for `PinnedDropImpl` - --> $DIR/conditional-drop-impl.rs:23:16 - | -23 | impl PinnedDrop for PinnedDropImpl { - | ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ - = note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/conditional-drop-impl.rs:23:16 + | +23 | impl PinnedDrop for PinnedDropImpl { + | ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ +note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/lib.rs:186:9 + | +186 | unsafe fn drop(self: Pin<&mut Self>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider restricting type parameter `T` - | -17 | struct PinnedDropImpl { - | ^^^^^^^^^^^^^^^^^^^^ + | +17 | struct PinnedDropImpl { + | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr b/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr index 9fd7cdb..d218545 100644 --- a/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr +++ b/tests/ui/pinned_drop/forget-pinned-drop-impl.stderr @@ -1,7 +1,11 @@ error[E0277]: the trait bound `Struct: PinnedDrop` is not satisfied - --> $DIR/forget-pinned-drop-impl.rs:3:15 - | -3 | #[pin_project(PinnedDrop)] //~ ERROR E0277 - | ^^^^^^^^^^ the trait `PinnedDrop` is not implemented for `Struct` - | - = note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/forget-pinned-drop-impl.rs:3:15 + | +3 | #[pin_project(PinnedDrop)] //~ ERROR E0277 + | ^^^^^^^^^^ the trait `PinnedDrop` is not implemented for `Struct` + | +note: required by `pin_project::__private::PinnedDrop::drop` + --> $DIR/lib.rs:186:9 + | +186 | unsafe fn drop(self: Pin<&mut Self>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/pinned_drop/self.stderr b/tests/ui/pinned_drop/self.stderr index 4ccbc41..7de286f 100644 --- a/tests/ui/pinned_drop/self.stderr +++ b/tests/ui/pinned_drop/self.stderr @@ -8,7 +8,7 @@ error: `self` parameter is only allowed in associated functions | ----- in this macro invocation | = note: associated functions are those in `impl` or `trait` definitions - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0434]: can't capture dynamic environment in a fn item --> $DIR/self.rs:16:29 @@ -20,7 +20,7 @@ error[E0434]: can't capture dynamic environment in a fn item | ----- in this macro invocation | = help: use the `|| { ... }` closure form instead - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0423]: expected value, found struct `S` --> $DIR/self.rs:40:27 diff --git a/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr b/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr index 44322ec..01e5080 100644 --- a/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr +++ b/tests/ui/unstable-features/marker_trait_attr-feature-gate.stderr @@ -7,4 +7,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 14 | impl Unpin for Struct {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/marker_trait_attr.stderr b/tests/ui/unstable-features/marker_trait_attr.stderr index 8893fb2..fbc2d9d 100644 --- a/tests/ui/unstable-features/marker_trait_attr.stderr +++ b/tests/ui/unstable-features/marker_trait_attr.stderr @@ -7,4 +7,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 20 | impl Unpin for Struct {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr index 64a0596..5eba425 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr +++ b/tests/ui/unstable-features/overlapping_marker_traits-feature-gate.stderr @@ -7,4 +7,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 14 | impl Unpin for Struct {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/overlapping_marker_traits.stderr b/tests/ui/unstable-features/overlapping_marker_traits.stderr index ffa50c7..706d6c9 100644 --- a/tests/ui/unstable-features/overlapping_marker_traits.stderr +++ b/tests/ui/unstable-features/overlapping_marker_traits.stderr @@ -15,4 +15,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type 24 | impl Unpin for Struct {} | --------------------------- first implementation here | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr index fa81083..cf3b075 100644 --- a/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr +++ b/tests/ui/unstable-features/trivial_bounds-feature-gate.stderr @@ -23,7 +23,11 @@ error[E0277]: `PhantomPinned` cannot be unpinned | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unpin` is not implemented for `PhantomPinned` | = note: consider using `Box::pin` - = note: required because of the requirements on the impl of `Unpin` for `phantom_pinned::Wrapper` +note: required because of the requirements on the impl of `Unpin` for `phantom_pinned::Wrapper` + --> $DIR/trivial_bounds-feature-gate.rs:12:13 + | +12 | impl Unpin for Wrapper where T: Unpin {} + | ^^^^^ ^^^^^^^^^^ = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -54,6 +58,10 @@ note: required because it appears within the type `Inner` | 30 | struct Inner(PhantomPinned); | ^^^^^ - = note: required because of the requirements on the impl of `Unpin` for `inner::Wrapper` +note: required because of the requirements on the impl of `Unpin` for `inner::Wrapper` + --> $DIR/trivial_bounds-feature-gate.rs:38:13 + | +38 | impl Unpin for Wrapper where T: Unpin {} + | ^^^^^ ^^^^^^^^^^ = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -- cgit v1.2.3