You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2021/03/16 13:39:16 UTC
[GitHub] [incubator-teaclave-sgx-sdk] longtomjr edited a comment on pull request #325: WIP - feat(sgx_types): add traits using derive
longtomjr edited a comment on pull request #325:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/pull/325#issuecomment-800260645
@dingelish I updated the existing macros to use derive for Debug and other implementations. This seems like the easiest way to go about this.
The main concern with updating the existing macros is that the `impl_struct` macro is exported from the crate, and this will change the behavior of the macro. I can create an internal macro for `impl_struct_and_debug`, and replace internal uses of the `impl_struct` macro with the new macro.
Also, I have not written macros before, so there might be other effects that I am missing here. Let me know if I should try a different angle or if there is something I can modify with this approach to make the implementation a little bit more sensible.
The reason I replaced the existing copy functionality is because of a compiler warning that derive cannot be used on repr(packed) structs that does not derive Copy. https://github.com/rust-lang/rust/issues/46043 should have more info
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org