Does `struct EmptyProp { dummy_field: bool }` have any cost?

compiler injects a dummy field to an empty struct, does it have any storage cost?

struct EmptyProd {}

Compiled to

struct EmtpyProp {
    dummy_field: bool,
} 
2 Likes

@shiqicao There’s a cost for empty structs (the cost of 1 byte).

2 Likes

any plan to make it zero cost?

2 Likes