Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions zerocopy-derive/src/enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(crate) fn generate_tag_enum(repr: &EnumRepr, data: &DataEnum) -> TokenStream
#[repr(#repr)]
#[allow(dead_code)]
enum ___ZerocopyTag {
#(#variants),*
#(#variants,)*
}
}
}
Expand Down Expand Up @@ -305,9 +305,9 @@ pub(crate) fn derive_is_bit_valid(

#tag_enum

type ___ZerocopyTagPrimitive = ::zerocopy::util::macro_util::SizeToTag<{
core_reexport::mem::size_of::<___ZerocopyTag>()
}>;
type ___ZerocopyTagPrimitive = ::zerocopy::util::macro_util::SizeToTag<
{ core_reexport::mem::size_of::<___ZerocopyTag>() },
>;

#tag_consts

Expand Down
2 changes: 1 addition & 1 deletion zerocopy-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ fn derive_try_from_bytes_struct(ast: &DeriveInput, strct: &DataStruct) -> proc_m
// validities of its fields, so this is a sound implementation of
// `is_bit_valid`.
fn is_bit_valid<A: ::zerocopy::pointer::invariant::Aliasing + ::zerocopy::pointer::invariant::AtLeast<::zerocopy::pointer::invariant::Shared> >(
mut candidate: ::zerocopy::Maybe<Self, A>
mut candidate: ::zerocopy::Maybe<Self, A>,
) -> bool {
true #(&& {
// SAFETY:
Expand Down
Loading