mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
The derive(MsgOnSocket) macro used to expand to something like: const __MSG_ON_SOCKET_IMPL_Typename: () = { extern crate msg_socket as _msg_socket; impl _msg_socket::MsgOnSocket for Typename { ... } }; This was helpful in 2015 edition code by allowing callers to invoke the derive without also writing `use msg_socket` at the top of the file to bring the crate into scope. In 2018 edition, paths beginning with a crate name do not need to be otherwise imported, so this derive can simply expand to: impl msg_socket::MsgOnSocket for Typename { ... } TEST=cargo test msg_socket TEST=cargo test msg_on_socket_derive Change-Id: I61b672b64404523f601de1d538ebe554985a0905 Reviewed-on: https://chromium-review.googlesource.com/1565545 Commit-Ready: David Tolnay <dtolnay@chromium.org> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: David Tolnay <dtolnay@chromium.org> |
||
---|---|---|
.. | ||
msg_on_socket_derive | ||
src | ||
tests | ||
Cargo.toml |