crosvm/msg_socket
David Tolnay 62041f0419 msg_socket: Simplify derive by removing const namespace
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>
2019-04-15 02:06:06 -07:00
..
msg_on_socket_derive msg_socket: Simplify derive by removing const namespace 2019-04-15 02:06:06 -07:00
src msg_socket: derive MsgOnSocket for bool 2019-04-04 15:11:04 -07:00
tests msg_socket: derive MsgOnSocket for bool 2019-04-04 15:11:04 -07:00
Cargo.toml cargo: Sort all dependency lists in Cargo.toml 2019-04-09 01:55:14 -07:00