Skip to content

Commit

Permalink
Hide documentation of the Unpin implementation for !Unpin (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-consoli authored Aug 6, 2023
1 parent 6c988b1 commit f318d3c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pin-project-internal/src/pin_project/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ fn make_unpin_impl(cx: &Context<'_>) -> TokenStream {
// call-site span.
let unsafety = <Token![unsafe]>::default();
quote_spanned! { span =>
#[doc(hidden)]
impl #proj_impl_generics _pin_project::__private::Unpin
for #orig_ident #ty_generics
#proj_where_clause
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 @@ -114,6 +114,7 @@ const _: () = {
}
}
}
#[doc(hidden)]
impl<'pin, T, U> _pin_project::__private::Unpin for Enum<T, U>
where
_pin_project::__private::Wrapper<
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 @@ -74,6 +74,7 @@ const _: () = {
let _ = &this.pinned;
let _ = &this.unpinned;
}
#[doc(hidden)]
impl<'pin, T, U> _pin_project::__private::Unpin for Struct<T, U>
where
_pin_project::__private::Wrapper<
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 @@ -68,6 +68,7 @@ const _: () = {
let _ = &this.0;
let _ = &this.1;
}
#[doc(hidden)]
impl<'pin, T, U> _pin_project::__private::Unpin for TupleStruct<T, U>
where
_pin_project::__private::Wrapper<
Expand Down

0 comments on commit f318d3c

Please sign in to comment.