diff --git a/src/lib.rs b/src/lib.rs index b93fcec..8d6db4f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -203,9 +203,10 @@ pin-project supports this. /// ``` /// /// The visibility of the projected types and projection methods is based on the -/// original type. However, if the visibility of the original type is `pub`, the -/// visibility of the projected types and the projection methods is downgraded -/// to `pub(crate)`. +/// original type. However, if the visibility of the original type is `pub` or the +/// visibility that has been parsed once by caller macro and can no longer be re-parsed by +/// us (due to [rustc bug](https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1666940521)), +/// the visibility of the projected types and the projection methods is forced to `pub(crate)`. /// /// # Safety /// @@ -805,7 +806,6 @@ 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. @@ -899,7 +899,6 @@ 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) @@ -978,7 +977,6 @@ 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>, @@ -1013,7 +1011,6 @@ 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>, @@ -1062,7 +1059,6 @@ 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>, @@ -1107,7 +1103,6 @@ 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>, @@ -1503,7 +1498,9 @@ macro_rules! __pin_project_internal { } }; // now determine visibility - // if public, downgrade + // `pub` or the visibility that has been parsed once by caller macro and + // can no longer be re-parsed by us (due to rustc bug), is forced to `pub(crate)`. + // https://github.com/taiki-e/pin-project-lite/issues/77#issuecomment-1666940521 ( [$($proj_mut_ident:ident)?] [$($proj_ref_ident:ident)?] @@ -1519,7 +1516,45 @@ macro_rules! __pin_project_internal { [$($proj_replace_ident)?] [$($proj_not_unpin_mark)?] [$($attrs)*] - [pub $struct_ty_ident $ident pub(crate)] + [pub, pub(crate), $struct_ty_ident $ident] + $($tt)* + } + }; + ( + [$($proj_mut_ident:ident)?] + [$($proj_ref_ident:ident)?] + [$($proj_replace_ident:ident)?] + [$( ! $proj_not_unpin_mark:ident)?] + [$($attrs:tt)*] + pub($($vis_path:tt)*) $struct_ty_ident:ident $ident:ident + $($tt:tt)* + ) => { + $crate::__pin_project_parse_generics! { + [$($proj_mut_ident)?] + [$($proj_ref_ident)?] + [$($proj_replace_ident)?] + [$($proj_not_unpin_mark)?] + [$($attrs)*] + [pub($($vis_path)*), pub($($vis_path)*), $struct_ty_ident $ident] + $($tt)* + } + }; + ( + [$($proj_mut_ident:ident)?] + [$($proj_ref_ident:ident)?] + [$($proj_replace_ident:ident)?] + [$( ! $proj_not_unpin_mark:ident)?] + [$($attrs:tt)*] + $struct_ty_ident:ident $ident:ident + $($tt:tt)* + ) => { + $crate::__pin_project_parse_generics! { + [$($proj_mut_ident)?] + [$($proj_ref_ident)?] + [$($proj_replace_ident)?] + [$($proj_not_unpin_mark)?] + [$($attrs)*] + [,,$struct_ty_ident $ident] $($tt)* } }; @@ -1538,7 +1573,7 @@ macro_rules! __pin_project_internal { [$($proj_replace_ident)?] [$($proj_not_unpin_mark)?] [$($attrs)*] - [$vis $struct_ty_ident $ident $vis] + [$vis, pub(crate), $struct_ty_ident $ident] $($tt)* } }; @@ -1553,7 +1588,7 @@ macro_rules! __pin_project_parse_generics { [$($proj_replace_ident:ident)?] [$($proj_not_unpin_mark:ident)?] [$($attrs:tt)*] - [$vis:vis $struct_ty_ident:ident $ident:ident $proj_vis:vis] + [$vis:vis, $proj_vis:vis, $struct_ty_ident:ident $ident:ident] $(< $( $lifetime:lifetime $(: $lifetime_bound:lifetime)? ),* $(,)? $( $generics:ident diff --git a/tests/expand/default/enum.expanded.rs b/tests/expand/default/enum.expanded.rs index 456b8cc..09e8691 100644 --- a/tests/expand/default/enum.expanded.rs +++ b/tests/expand/default/enum.expanded.rs @@ -3,7 +3,6 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -21,7 +20,6 @@ where }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -39,7 +37,6 @@ where }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -54,7 +51,6 @@ 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>, @@ -73,7 +69,6 @@ const _: () = { } } } - #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -92,7 +87,6 @@ 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 a9792e1..fc10dd7 100644 --- a/tests/expand/default/struct.expanded.rs +++ b/tests/expand/default/struct.expanded.rs @@ -9,7 +9,6 @@ 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,7 +23,6 @@ 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)] @@ -40,7 +38,6 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -53,7 +50,6 @@ 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 f722a14..f6bf9dc 100644 --- a/tests/expand/multifields/enum.expanded.rs +++ b/tests/expand/multifields/enum.expanded.rs @@ -3,7 +3,6 @@ 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)] @@ -23,7 +22,6 @@ 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 83ebefe..fdf6edf 100644 --- a/tests/expand/multifields/struct.expanded.rs +++ b/tests/expand/multifields/struct.expanded.rs @@ -5,7 +5,6 @@ struct Struct { unpinned1: U, unpinned2: U, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -23,7 +22,6 @@ 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)] @@ -40,7 +38,6 @@ const _: () = { unpinned1: &'__pin mut (U), unpinned2: &'__pin mut (U), } - #[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -58,7 +55,6 @@ const _: () = { unpinned2: &'__pin (U), } impl Struct { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -74,7 +70,6 @@ const _: () = { } } } - #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -89,7 +84,6 @@ 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 456b8cc..09e8691 100644 --- a/tests/expand/naming/enum-all.expanded.rs +++ b/tests/expand/naming/enum-all.expanded.rs @@ -3,7 +3,6 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -21,7 +20,6 @@ where }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -39,7 +37,6 @@ where }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::mut_mut)] @@ -54,7 +51,6 @@ 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>, @@ -73,7 +69,6 @@ const _: () = { } } } - #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -92,7 +87,6 @@ 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 342588c..79c9050 100644 --- a/tests/expand/naming/enum-mut.expanded.rs +++ b/tests/expand/naming/enum-mut.expanded.rs @@ -3,7 +3,6 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -26,7 +25,6 @@ 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 5270e12..fa155d9 100644 --- a/tests/expand/naming/enum-ref.expanded.rs +++ b/tests/expand/naming/enum-ref.expanded.rs @@ -3,7 +3,6 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -26,7 +25,6 @@ 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 13c4079..dfea762 100644 --- a/tests/expand/naming/struct-all.expanded.rs +++ b/tests/expand/naming/struct-all.expanded.rs @@ -3,7 +3,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -18,7 +17,6 @@ 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)] @@ -33,7 +31,6 @@ 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)] @@ -50,7 +47,6 @@ 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>, @@ -63,7 +59,6 @@ const _: () = { } } } - #[doc(hidden)] #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, @@ -76,7 +71,6 @@ 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 9b6dae8..ed05dbb 100644 --- a/tests/expand/naming/struct-mut.expanded.rs +++ b/tests/expand/naming/struct-mut.expanded.rs @@ -3,7 +3,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -24,7 +23,6 @@ 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)] @@ -40,7 +38,6 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -53,7 +50,6 @@ 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 a9792e1..fc10dd7 100644 --- a/tests/expand/naming/struct-none.expanded.rs +++ b/tests/expand/naming/struct-none.expanded.rs @@ -9,7 +9,6 @@ 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,7 +23,6 @@ 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)] @@ -40,7 +38,6 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -53,7 +50,6 @@ 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 9fea20d..4edb631 100644 --- a/tests/expand/naming/struct-ref.expanded.rs +++ b/tests/expand/naming/struct-ref.expanded.rs @@ -3,7 +3,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -24,7 +23,6 @@ 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)] @@ -40,7 +38,6 @@ const _: () = { unpinned: &'__pin mut (U), } impl Struct { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -53,7 +50,6 @@ 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 02cdc23..640ae30 100644 --- a/tests/expand/not_unpin/enum.expanded.rs +++ b/tests/expand/not_unpin/enum.expanded.rs @@ -3,7 +3,6 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -21,7 +20,6 @@ where }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -44,7 +42,6 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -63,7 +60,6 @@ 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 2e590b6..05dc3d3 100644 --- a/tests/expand/not_unpin/struct.expanded.rs +++ b/tests/expand/not_unpin/struct.expanded.rs @@ -3,7 +3,6 @@ struct Struct { pinned: T, unpinned: U, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -18,7 +17,6 @@ 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)] @@ -40,7 +38,6 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Struct { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -53,7 +50,6 @@ 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 03901ce..838707d 100644 --- a/tests/expand/pinned_drop/enum.expanded.rs +++ b/tests/expand/pinned_drop/enum.expanded.rs @@ -4,7 +4,6 @@ enum Enum { Struct { pinned: T, unpinned: U }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -22,7 +21,6 @@ where }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -45,7 +43,6 @@ where #[allow(clippy::used_underscore_binding)] const _: () = { impl Enum { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -64,7 +61,6 @@ 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 f3fa923..567fefa 100644 --- a/tests/expand/pinned_drop/struct.expanded.rs +++ b/tests/expand/pinned_drop/struct.expanded.rs @@ -10,7 +10,6 @@ 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)] @@ -25,7 +24,6 @@ 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)] @@ -41,7 +39,6 @@ const _: () = { unpinned: &'__pin (U), } impl Struct { - #[doc(hidden)] #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -54,7 +51,6 @@ 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 85c7770..aebc3f7 100644 --- a/tests/expand/pub/enum.expanded.rs +++ b/tests/expand/pub/enum.expanded.rs @@ -3,7 +3,6 @@ pub enum Enum { Struct { pinned: T, unpinned: U }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -21,7 +20,6 @@ where }, Unit, } -#[doc(hidden)] #[allow(dead_code)] #[allow(single_use_lifetimes)] #[allow(clippy::unknown_clippy_lints)] @@ -44,7 +42,6 @@ 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>, @@ -63,7 +60,6 @@ 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 a06783d..7562eb5 100644 --- a/tests/expand/pub/struct.expanded.rs +++ b/tests/expand/pub/struct.expanded.rs @@ -9,7 +9,6 @@ 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)] @@ -24,7 +23,6 @@ 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)] @@ -40,7 +38,6 @@ const _: () = { pub unpinned: &'__pin (U), } impl Struct { - #[doc(hidden)] #[inline] pub(crate) fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, @@ -53,7 +50,6 @@ const _: () = { } } } - #[doc(hidden)] #[inline] pub(crate) fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>,