diff --git a/CHANGELOG.md b/CHANGELOG.md index 74e9e3e8..fbafa8a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [Unreleased] +- [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.](https://github.com/taiki-e/pin-project/pull/326) diff --git a/examples/enum-default-expanded.rs b/examples/enum-default-expanded.rs index 21535929..459ca39b 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 019f1519..82207b60 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/pin-project-internal/src/pin_project/derive.rs b/pin-project-internal/src/pin_project/derive.rs index 160c5b90..47c061f9 100644 --- a/pin-project-internal/src/pin_project/derive.rs +++ b/pin-project-internal/src/pin_project/derive.rs @@ -88,6 +88,7 @@ impl GenerateTokens { // * https://github.com/taiki-e/pin-project/pull/70 #allowed_lints #[allow(clippy::semicolon_if_nothing_returned)] + #[allow(clippy::use_self)] #[allow(clippy::used_underscore_binding)] const _: () = { #scoped @@ -112,12 +113,13 @@ fn global_allowed_lints() -> TokenStream { #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] // This lint warns `pub(crate)` field in private struct. + #[allow(clippy::type_repetition_in_bounds)] // https://github.com/rust-lang/rust-clippy/issues/4326 } } /// Returns attributes used on projected types. -fn proj_allowed_lints(kind: TypeKind) -> (TokenStream, TokenStream, TokenStream) { - let large_enum_variant = if kind == Enum { +fn proj_allowed_lints(cx: &Context<'_>) -> (TokenStream, TokenStream, TokenStream) { + let large_enum_variant = if cx.kind == Enum { Some(quote! { #[allow(variant_size_differences)] #[allow(clippy::large_enum_variant)] @@ -126,20 +128,22 @@ fn proj_allowed_lints(kind: TypeKind) -> (TokenStream, TokenStream, TokenStream) None }; let global_allowed_lints = global_allowed_lints(); + let proj_mut_allowed_lints = if cx.project { Some(&global_allowed_lints) } else { None }; let proj_mut = quote! { - #global_allowed_lints + #proj_mut_allowed_lints #[allow(dead_code)] // This lint warns unused fields/variants. #[allow(clippy::mut_mut)] // This lint warns `&mut &mut `. - #[allow(clippy::type_repetition_in_bounds)] // https://github.com/rust-lang/rust-clippy/issues/4326} }; + let proj_ref_allowed_lints = if cx.project_ref { Some(&global_allowed_lints) } else { None }; let proj_ref = quote! { - #global_allowed_lints + #proj_ref_allowed_lints #[allow(dead_code)] // This lint warns unused fields/variants. #[allow(clippy::ref_option_ref)] // This lint warns `&Option<&>`. - #[allow(clippy::type_repetition_in_bounds)] // https://github.com/rust-lang/rust-clippy/issues/4326 }; + let proj_own_allowed_lints = + if cx.project_replace.ident().is_some() { Some(&global_allowed_lints) } else { None }; let proj_own = quote! { - #global_allowed_lints + #proj_own_allowed_lints #[allow(dead_code)] // This lint warns unused fields/variants. #large_enum_variant }; @@ -368,7 +372,7 @@ fn parse_struct<'a>( Fields::Unit => unreachable!(), }; - let (proj_attrs, proj_ref_attrs, proj_own_attrs) = proj_allowed_lints(cx.kind); + let (proj_attrs, proj_ref_attrs, proj_own_attrs) = proj_allowed_lints(cx); generate.extend(cx.project, quote! { #proj_attrs #vis struct #proj_ident #proj_generics #where_clause_fields @@ -441,7 +445,7 @@ fn parse_enum<'a>( let proj_generics = &cx.proj.generics; let proj_where_clause = &cx.proj.where_clause; - let (proj_attrs, proj_ref_attrs, proj_own_attrs) = proj_allowed_lints(cx.kind); + let (proj_attrs, proj_ref_attrs, proj_own_attrs) = proj_allowed_lints(cx); if cx.project { generate.extend(true, quote! { #proj_attrs @@ -611,7 +615,7 @@ fn visit_fields<'a>( let proj_own_fields = surround(delim, proj_own_fields); let proj_move = Group::new(delim, proj_move); - let proj_own_body = proj_own_body(cx, variant_ident, Some(proj_move), &pinned_bindings); + let proj_own_body = proj_own_body(cx, variant_ident, Some(&proj_move), &pinned_bindings); Ok(ProjectedFields { proj_pat, @@ -629,7 +633,7 @@ fn visit_fields<'a>( fn proj_own_body( cx: &Context<'_>, variant_ident: Option<&Ident>, - proj_move: Option, + proj_move: Option<&Group>, pinned_fields: &[Ident], ) -> TokenStream { let ident = &cx.proj.own_ident; diff --git a/tests/auxiliary/macro/lib.rs b/tests/auxiliary/macro/lib.rs index b0615ffc..0e133f71 100644 --- a/tests/auxiliary/macro/lib.rs +++ b/tests/auxiliary/macro/lib.rs @@ -1,5 +1,6 @@ #![cfg(nightly)] #![warn(rust_2018_idioms, single_use_lifetimes)] +#![allow(clippy::pedantic)] use proc_macro::TokenStream; use quote::{format_ident, quote, ToTokens}; diff --git a/tests/expand/default/enum.expanded.rs b/tests/expand/default/enum.expanded.rs index e042f8ca..75ec2fe3 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 70f04ef2..794675a3 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 1322d22b..6a3dfbfe 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 4c935d75..6ccbd9d5 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 1f7dfdd7..7e3505bd 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 aef8f8d5..7b47899e 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 561bb899..21c1c593 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 3489c6ed..73243725 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 a33491ee..34100017 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 6ca558b3..a63a8746 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 0dcb829a..61975578 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 88e024c5..54b63f56 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 1365b23b..ee641d6d 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 70f04ef2..794675a3 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 899166f8..28538384 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 f636f108..baee3240 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 e4032bef..125d4835 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 076e4a07..f7daaff7 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 1322d22b..6a3dfbfe 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 eda82676..5f180452 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 3c2618f8..d8d5008b 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 6305b789..3414a10d 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 680fb03f..b701af5a 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 8bc6bbcc..4b734837 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 6e6ed544..a968b724 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 10ca8c1d..630389bb 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 506726c8..f06f2ae9 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 304e0a79..27ff08a8 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 d3ed9e45..bad49844 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 91077f3b..bc5a6e57 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 5026bada..f9bd9fe9 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 7e6b9755..8abd9a1c 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 48355e3e..2641d167 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 df962d07..1c51df05 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 76f4e528..67ede397 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 a0a52a86..512f1394 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/pin_project.rs b/tests/pin_project.rs index 88adb67d..aa08056e 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 diff --git a/tests/pinned_drop.rs b/tests/pinned_drop.rs index 785cea3f..99273c42 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() {} }