From 8d407ab4bd4e4a53fefa8c714ded72fbbda3a92d Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Wed, 9 Aug 2023 23:51:59 +0900 Subject: [PATCH] Add #[doc(hidden)] to projected types/methods to mitigate impact of rustc bug --- src/lib.rs | 6 ++++++ tests/expand/default/enum.expanded.rs | 6 ++++++ tests/expand/default/struct.expanded.rs | 4 ++++ tests/expand/multifields/enum.expanded.rs | 2 ++ tests/expand/multifields/struct.expanded.rs | 6 ++++++ tests/expand/naming/enum-all.expanded.rs | 6 ++++++ tests/expand/naming/enum-mut.expanded.rs | 2 ++ tests/expand/naming/enum-ref.expanded.rs | 2 ++ tests/expand/naming/struct-all.expanded.rs | 6 ++++++ tests/expand/naming/struct-mut.expanded.rs | 4 ++++ tests/expand/naming/struct-none.expanded.rs | 4 ++++ tests/expand/naming/struct-ref.expanded.rs | 4 ++++ tests/expand/not_unpin/enum.expanded.rs | 4 ++++ tests/expand/not_unpin/struct.expanded.rs | 4 ++++ tests/expand/pinned_drop/enum.expanded.rs | 4 ++++ tests/expand/pinned_drop/struct.expanded.rs | 4 ++++ tests/expand/pub/enum.expanded.rs | 4 ++++ tests/expand/pub/struct.expanded.rs | 4 ++++ 18 files changed, 76 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 3eeb9f9..b93fcec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -805,6 +805,7 @@ macro_rules! __pin_project_make_proj_ty_body { [$($impl_generics:tt)*] [$($ty_generics:tt)*] [$(where $($where_clause:tt)*)?] [$($body_data:tt)+] ) => { + #[doc(hidden)] // Workaround for rustc bug: see https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1671540180 for more. #[allow(dead_code)] // This lint warns unused fields/variants. #[allow(single_use_lifetimes)] // https://github.com/rust-lang/rust/issues/55058 // This lint warns of `clippy::*` generated by external macros. @@ -898,6 +899,7 @@ macro_rules! __pin_project_make_proj_replace_ty_body { [$($impl_generics:tt)*] [$($ty_generics:tt)*] [$(where $($where_clause:tt)*)?] [$($body_data:tt)+] ) => { + #[doc(hidden)] // Workaround for rustc bug: see https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1671540180 for more. #[allow(dead_code)] // This lint warns unused fields/variants. #[allow(single_use_lifetimes)] // https://github.com/rust-lang/rust/issues/55058 #[allow(clippy::mut_mut)] // This lint warns `&mut &mut `. (only needed for project) @@ -976,6 +978,7 @@ macro_rules! __pin_project_struct_make_proj_method { ),+ } ) => { + #[doc(hidden)] // Workaround for rustc bug: see https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1671540180 for more. #[inline] $proj_vis fn $method_ident<'__pin>( self: $crate::__private::Pin<&'__pin $($mut)? Self>, @@ -1010,6 +1013,7 @@ macro_rules! __pin_project_struct_make_proj_replace_method { ),+ } ) => { + #[doc(hidden)] // Workaround for rustc bug: see https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1671540180 for more. #[inline] $proj_vis fn project_replace( self: $crate::__private::Pin<&mut Self>, @@ -1058,6 +1062,7 @@ macro_rules! __pin_project_enum_make_proj_method { ),+ } ) => { + #[doc(hidden)] // Workaround for rustc bug: see https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1671540180 for more. #[inline] $proj_vis fn $method_ident<'__pin>( self: $crate::__private::Pin<&'__pin $($mut)? Self>, @@ -1102,6 +1107,7 @@ macro_rules! __pin_project_enum_make_proj_replace_method { ),+ } ) => { + #[doc(hidden)] // Workaround for rustc bug: see https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1671540180 for more. #[inline] $proj_vis fn project_replace( self: $crate::__private::Pin<&mut Self>, diff --git a/tests/expand/default/enum.expanded.rs b/tests/expand/default/enum.expanded.rs index 09e8691..456b8cc 100644 --- a/tests/expand/default/enum.expanded.rs +++ b/tests/expand/default/enum.expanded.rs @@ -3,6 +3,7 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -20,6 +21,7 @@ where }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -37,6 +39,7 @@ where }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -51,6 +54,7 @@ enum EnumProjReplace { #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -69,6 +73,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -87,6 +92,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_replace( self: ::pin_project_lite::__private::Pin<&mut Self>, diff --git a/tests/expand/default/struct.expanded.rs b/tests/expand/default/struct.expanded.rs index fc10dd7..a9792e1 100644 --- a/tests/expand/default/struct.expanded.rs +++ b/tests/expand/default/struct.expanded.rs @@ -9,6 +9,7 @@ struct Struct { #[allow(clippy::redundant_pub_crate)] #[allow(clippy::used_underscore_binding)] const _: () = { + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -23,6 +24,7 @@ const _: () = { pinned: ::pin_project_lite::__private::Pin<&'__pin mut (T)>, unpinned: &'__pin mut (U), } + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -38,6 +40,7 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -50,6 +53,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/multifields/enum.expanded.rs b/tests/expand/multifields/enum.expanded.rs index f6bf9dc..f722a14 100644 --- a/tests/expand/multifields/enum.expanded.rs +++ b/tests/expand/multifields/enum.expanded.rs @@ -3,6 +3,7 @@ enum Enum { Struct { pinned1: T, pinned2: T, unpinned1: U, unpinned2: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -22,6 +23,7 @@ enum EnumProjReplace { #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] fn project_replace( self: ::pin_project_lite::__private::Pin<&mut Self>, diff --git a/tests/expand/multifields/struct.expanded.rs b/tests/expand/multifields/struct.expanded.rs index fdf6edf..83ebefe 100644 --- a/tests/expand/multifields/struct.expanded.rs +++ b/tests/expand/multifields/struct.expanded.rs @@ -5,6 +5,7 @@ struct Struct { unpinned1: U, unpinned2: U, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -22,6 +23,7 @@ struct StructProjReplace { #[allow(clippy::redundant_pub_crate)] #[allow(clippy::used_underscore_binding)] const _: () = { + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -38,6 +40,7 @@ const _: () = { unpinned1: &'__pin mut (U), unpinned2: &'__pin mut (U), } + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -55,6 +58,7 @@ const _: () = { unpinned2: &'__pin (U), } impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -70,6 +74,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -84,6 +89,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_replace( self: ::pin_project_lite::__private::Pin<&mut Self>, diff --git a/tests/expand/naming/enum-all.expanded.rs b/tests/expand/naming/enum-all.expanded.rs index 09e8691..456b8cc 100644 --- a/tests/expand/naming/enum-all.expanded.rs +++ b/tests/expand/naming/enum-all.expanded.rs @@ -3,6 +3,7 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -20,6 +21,7 @@ where }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -37,6 +39,7 @@ where }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -51,6 +54,7 @@ enum EnumProjReplace { #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -69,6 +73,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -87,6 +92,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_replace( self: ::pin_project_lite::__private::Pin<&mut Self>, diff --git a/tests/expand/naming/enum-mut.expanded.rs b/tests/expand/naming/enum-mut.expanded.rs index 79c9050..342588c 100644 --- a/tests/expand/naming/enum-mut.expanded.rs +++ b/tests/expand/naming/enum-mut.expanded.rs @@ -3,6 +3,7 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -25,6 +26,7 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, diff --git a/tests/expand/naming/enum-ref.expanded.rs b/tests/expand/naming/enum-ref.expanded.rs index fa155d9..5270e12 100644 --- a/tests/expand/naming/enum-ref.expanded.rs +++ b/tests/expand/naming/enum-ref.expanded.rs @@ -3,6 +3,7 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -25,6 +26,7 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/naming/struct-all.expanded.rs b/tests/expand/naming/struct-all.expanded.rs index dfea762..13c4079 100644 --- a/tests/expand/naming/struct-all.expanded.rs +++ b/tests/expand/naming/struct-all.expanded.rs @@ -3,6 +3,7 @@ struct Struct { pinned: T, unpinned: U, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -17,6 +18,7 @@ where pinned: ::pin_project_lite::__private::Pin<&'__pin mut (T)>, unpinned: &'__pin mut (U), } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -31,6 +33,7 @@ where pinned: ::pin_project_lite::__private::Pin<&'__pin (T)>, unpinned: &'__pin (U), } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -47,6 +50,7 @@ struct StructProjReplace { #[allow(clippy::used_underscore_binding)] const _: () = { impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -59,6 +63,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -71,6 +76,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_replace( self: ::pin_project_lite::__private::Pin<&mut Self>, diff --git a/tests/expand/naming/struct-mut.expanded.rs b/tests/expand/naming/struct-mut.expanded.rs index ed05dbb..9b6dae8 100644 --- a/tests/expand/naming/struct-mut.expanded.rs +++ b/tests/expand/naming/struct-mut.expanded.rs @@ -3,6 +3,7 @@ struct Struct { pinned: T, unpinned: U, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -23,6 +24,7 @@ where #[allow(clippy::redundant_pub_crate)] #[allow(clippy::used_underscore_binding)] const _: () = { + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -38,6 +40,7 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -50,6 +53,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/naming/struct-none.expanded.rs b/tests/expand/naming/struct-none.expanded.rs index fc10dd7..a9792e1 100644 --- a/tests/expand/naming/struct-none.expanded.rs +++ b/tests/expand/naming/struct-none.expanded.rs @@ -9,6 +9,7 @@ struct Struct { #[allow(clippy::redundant_pub_crate)] #[allow(clippy::used_underscore_binding)] const _: () = { + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -23,6 +24,7 @@ const _: () = { pinned: ::pin_project_lite::__private::Pin<&'__pin mut (T)>, unpinned: &'__pin mut (U), } + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -38,6 +40,7 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -50,6 +53,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/naming/struct-ref.expanded.rs b/tests/expand/naming/struct-ref.expanded.rs index 4edb631..9fea20d 100644 --- a/tests/expand/naming/struct-ref.expanded.rs +++ b/tests/expand/naming/struct-ref.expanded.rs @@ -3,6 +3,7 @@ struct Struct { pinned: T, unpinned: U, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -23,6 +24,7 @@ where #[allow(clippy::redundant_pub_crate)] #[allow(clippy::used_underscore_binding)] const _: () = { + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -38,6 +40,7 @@ const _: () = { unpinned: &'__pin mut (U), } impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -50,6 +53,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/not_unpin/enum.expanded.rs b/tests/expand/not_unpin/enum.expanded.rs index 640ae30..02cdc23 100644 --- a/tests/expand/not_unpin/enum.expanded.rs +++ b/tests/expand/not_unpin/enum.expanded.rs @@ -3,6 +3,7 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -20,6 +21,7 @@ where }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -42,6 +44,7 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -60,6 +63,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/not_unpin/struct.expanded.rs b/tests/expand/not_unpin/struct.expanded.rs index 05dc3d3..2e590b6 100644 --- a/tests/expand/not_unpin/struct.expanded.rs +++ b/tests/expand/not_unpin/struct.expanded.rs @@ -3,6 +3,7 @@ struct Struct { pinned: T, unpinned: U, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -17,6 +18,7 @@ where pinned: ::pin_project_lite::__private::Pin<&'__pin mut (T)>, unpinned: &'__pin mut (U), } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -38,6 +40,7 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -50,6 +53,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/pinned_drop/enum.expanded.rs b/tests/expand/pinned_drop/enum.expanded.rs index 838707d..03901ce 100644 --- a/tests/expand/pinned_drop/enum.expanded.rs +++ b/tests/expand/pinned_drop/enum.expanded.rs @@ -4,6 +4,7 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -21,6 +22,7 @@ where }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -43,6 +45,7 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -61,6 +64,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/pinned_drop/struct.expanded.rs b/tests/expand/pinned_drop/struct.expanded.rs index 567fefa..f3fa923 100644 --- a/tests/expand/pinned_drop/struct.expanded.rs +++ b/tests/expand/pinned_drop/struct.expanded.rs @@ -10,6 +10,7 @@ struct Struct { #[allow(clippy::redundant_pub_crate)] #[allow(clippy::used_underscore_binding)] const _: () = { + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -24,6 +25,7 @@ const _: () = { pinned: ::pin_project_lite::__private::Pin<&'__pin mut (T)>, unpinned: &'__pin mut (U), } + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -39,6 +41,7 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { + #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -51,6 +54,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/pub/enum.expanded.rs b/tests/expand/pub/enum.expanded.rs index aebc3f7..85c7770 100644 --- a/tests/expand/pub/enum.expanded.rs +++ b/tests/expand/pub/enum.expanded.rs @@ -3,6 +3,7 @@ pub enum Enum { Struct { pinned: T, unpinned: U }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -20,6 +21,7 @@ where }, Unit, } +#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -42,6 +44,7 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { + #[doc(hidden)] #[inline] pub(crate) fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -60,6 +63,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] pub(crate) fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, diff --git a/tests/expand/pub/struct.expanded.rs b/tests/expand/pub/struct.expanded.rs index 7562eb5..a06783d 100644 --- a/tests/expand/pub/struct.expanded.rs +++ b/tests/expand/pub/struct.expanded.rs @@ -9,6 +9,7 @@ pub struct Struct { #[allow(clippy::redundant_pub_crate)] #[allow(clippy::used_underscore_binding)] const _: () = { + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -23,6 +24,7 @@ const _: () = { pub pinned: ::pin_project_lite::__private::Pin<&'__pin mut (T)>, pub unpinned: &'__pin mut (U), } + #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -38,6 +40,7 @@ const _: () = { pub unpinned: &'__pin (U), } impl Struct { + #[doc(hidden)] #[inline] pub(crate) fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -50,6 +53,7 @@ const _: () = { } } } + #[doc(hidden)] #[inline] pub(crate) fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>,