Skip to content

Commit

Permalink
Add allow(clippy::missing_docs_in_private_items)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Jan 25, 2024
1 parent e0edbbc commit 75fa3f7
Show file tree
Hide file tree
Showing 35 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pin-project-internal/src/pin_project/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ fn proj_allowed_lints(cx: &Context<'_>) -> (TokenStream, TokenStream, TokenStrea
#proj_mut_allowed_lints
#[allow(dead_code)] // This lint warns unused fields/variants.
#[allow(clippy::mut_mut)] // This lint warns `&mut &mut <ty>`.
#[allow(clippy::missing_docs_in_private_items)]
};
let proj_ref_allowed_lints = if cx.project_ref { Some(&global_allowed_lints) } else { None };
let proj_ref = quote! {
Expand All @@ -148,6 +149,7 @@ fn proj_allowed_lints(cx: &Context<'_>) -> (TokenStream, TokenStream, TokenStrea
let proj_own = quote! {
#proj_own_allowed_lints
#[allow(dead_code)] // This lint warns unused fields/variants.
#[allow(clippy::missing_docs_in_private_items)]
#large_enum_variant
};
(proj_mut, proj_ref, proj_own)
Expand Down
1 change: 1 addition & 0 deletions tests/expand/default/enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
enum EnumProj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/default/struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/default/tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/multifields/enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
enum EnumProj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down Expand Up @@ -82,6 +83,7 @@ where
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
#[allow(variant_size_differences)]
#[allow(clippy::large_enum_variant)]
enum EnumProjOwn<T, U> {
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/multifields/struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand All @@ -48,6 +49,7 @@ const _: () = {
unpinned2: &'pin (U),
}
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjectionOwned<T, U> {
pinned1: ::pin_project::__private::PhantomData<T>,
pinned2: ::pin_project::__private::PhantomData<T>,
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/multifields/tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
::pin_project::__private::Pin<&'pin mut (T)>,
Expand All @@ -39,6 +40,7 @@ const _: () = {
where
TupleStruct<T, U>: 'pin;
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjectionOwned<T, U>(
::pin_project::__private::PhantomData<T>,
::pin_project::__private::PhantomData<T>,
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/naming/enum-all.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
enum Proj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down Expand Up @@ -59,6 +60,7 @@ where
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
#[allow(variant_size_differences)]
#[allow(clippy::large_enum_variant)]
enum ProjOwn<T, U> {
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/enum-mut.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
enum Proj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/enum-own.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enum Enum<T, U> {
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
#[allow(variant_size_differences)]
#[allow(clippy::large_enum_variant)]
enum ProjOwn<T, U> {
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/naming/struct-all.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct Struct<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct Proj<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down Expand Up @@ -54,6 +55,7 @@ where
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct ProjOwn<T, U> {
pinned: ::pin_project::__private::PhantomData<T>,
unpinned: U,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/struct-mut.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct Struct<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct Proj<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/struct-none.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/naming/struct-own.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ struct Struct<T, U> {
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct ProjOwn<T, U> {
pinned: ::pin_project::__private::PhantomData<T>,
unpinned: U,
Expand All @@ -39,6 +40,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/struct-ref.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/naming/tuple_struct-all.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct Proj<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down Expand Up @@ -48,6 +49,7 @@ where
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct ProjOwn<T, U>(::pin_project::__private::PhantomData<T>, U);
#[allow(box_pointers)]
#[allow(deprecated)]
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/tuple_struct-mut.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct Proj<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/tuple_struct-none.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/naming/tuple_struct-own.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct ProjOwn<T, U>(::pin_project::__private::PhantomData<T>, U);
#[allow(box_pointers)]
#[allow(deprecated)]
Expand All @@ -32,6 +33,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down
1 change: 1 addition & 0 deletions tests/expand/naming/tuple_struct-ref.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down
1 change: 1 addition & 0 deletions tests/expand/not_unpin/enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
enum EnumProj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/not_unpin/struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/not_unpin/tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down
1 change: 1 addition & 0 deletions tests/expand/pinned_drop/enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
enum EnumProj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/pinned_drop/struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/pinned_drop/tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down
1 change: 1 addition & 0 deletions tests/expand/project_replace/enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enum Enum<T, U> {
#[allow(clippy::redundant_pub_crate)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
#[allow(variant_size_differences)]
#[allow(clippy::large_enum_variant)]
enum EnumProjOwn<T, U> {
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/project_replace/struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand All @@ -41,6 +42,7 @@ const _: () = {
unpinned: &'pin (U),
}
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjectionOwned<T, U> {
pinned: ::pin_project::__private::PhantomData<T>,
unpinned: U,
Expand Down
2 changes: 2 additions & 0 deletions tests/expand/project_replace/tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand All @@ -35,6 +36,7 @@ const _: () = {
where
TupleStruct<T, U>: 'pin;
#[allow(dead_code)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjectionOwned<T, U>(
::pin_project::__private::PhantomData<T>,
U,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/pub/enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
pub(crate) enum EnumProj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/pub/struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
pub(crate) struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/pub/tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
pub(crate) struct __TupleStructProjection<'pin, T, U>(
pub ::pin_project::__private::Pin<&'pin mut (T)>,
pub &'pin mut (U),
Expand Down
1 change: 1 addition & 0 deletions tests/expand/unsafe_unpin/enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum Enum<T, U> {
#[allow(clippy::type_repetition_in_bounds)]
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
enum EnumProj<'pin, T, U>
where
Enum<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/unsafe_unpin/struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
Expand Down
1 change: 1 addition & 0 deletions tests/expand/unsafe_unpin/tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const _: () = {
extern crate pin_project as _pin_project;
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
#[allow(clippy::missing_docs_in_private_items)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
Expand Down

0 comments on commit 75fa3f7

Please sign in to comment.