mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-25 08:12:26 +00:00
Add #[doc(hidden)]
on derive generated items. (#189)
This commit is contained in:
parent
8391afa876
commit
df5262b19c
@ -538,6 +538,7 @@ fn generate_assert_no_padding(input: &DeriveInput) -> Result<TokenStream> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Ok(quote_spanned! {span => const _: fn() = || {
|
Ok(quote_spanned! {span => const _: fn() = || {
|
||||||
|
#[doc(hidden)]
|
||||||
struct TypeWithoutPadding([u8; #size_sum]);
|
struct TypeWithoutPadding([u8; #size_sum]);
|
||||||
let _ = ::core::mem::transmute::<#struct_type, TypeWithoutPadding>;
|
let _ = ::core::mem::transmute::<#struct_type, TypeWithoutPadding>;
|
||||||
};})
|
};})
|
||||||
@ -554,6 +555,7 @@ fn generate_fields_are_trait(
|
|||||||
let field_types = get_field_types(&fields);
|
let field_types = get_field_types(&fields);
|
||||||
Ok(quote_spanned! {span => #(const _: fn() = || {
|
Ok(quote_spanned! {span => #(const _: fn() = || {
|
||||||
#[allow(clippy::missing_const_for_fn)]
|
#[allow(clippy::missing_const_for_fn)]
|
||||||
|
#[doc(hidden)]
|
||||||
fn check #impl_generics () #where_clause {
|
fn check #impl_generics () #where_clause {
|
||||||
fn assert_impl<T: #trait_>() {}
|
fn assert_impl<T: #trait_>() {}
|
||||||
assert_impl::<#field_types>();
|
assert_impl::<#field_types>();
|
||||||
|
Loading…
Reference in New Issue
Block a user