From 633426a8fc20a5eef402e159d53228aae13bbaa5 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 12 Apr 2019 12:18:35 -0700 Subject: edition: Fill in macro imports Macros were previously imported through `#[macro_use] extern crate`, which is basically a glob import of all macros from the crate. As of 2018 edition of Rust, `extern crate` is no longer required and macros are imported individually like any other item from a dependency. This CL fills in all the appropriate macro imports that will allow us to remove our use of `extern crate` in a subsequent CL. TEST=cargo check --all-features --tests TEST=kokoro Change-Id: If2ec08b06b743abf5f62677c6a9927c3d5d90a54 Reviewed-on: https://chromium-review.googlesource.com/1565546 Commit-Ready: David Tolnay Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: David Tolnay --- msg_socket/msg_on_socket_derive/msg_on_socket_derive.rs | 3 ++- msg_socket/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'msg_socket') diff --git a/msg_socket/msg_on_socket_derive/msg_on_socket_derive.rs b/msg_socket/msg_on_socket_derive/msg_on_socket_derive.rs index 724a29c..bb90255 100644 --- a/msg_socket/msg_on_socket_derive/msg_on_socket_derive.rs +++ b/msg_socket/msg_on_socket_derive/msg_on_socket_derive.rs @@ -15,7 +15,8 @@ extern crate syn; use std::vec::Vec; use proc_macro2::{Span, TokenStream}; -use syn::{Data, DataEnum, DataStruct, DeriveInput, Fields, Ident}; +use quote::quote; +use syn::{parse_macro_input, Data, DataEnum, DataStruct, DeriveInput, Fields, Ident}; /// The function that derives the recursive implementation for struct or enum. #[proc_macro_derive(MsgOnSocket)] diff --git a/msg_socket/src/lib.rs b/msg_socket/src/lib.rs index a43e030..c3cc411 100644 --- a/msg_socket/src/lib.rs +++ b/msg_socket/src/lib.rs @@ -16,7 +16,7 @@ use std::marker::PhantomData; use std::ops::Deref; use std::os::unix::io::{AsRawFd, RawFd}; -use sys_util::{net::UnixSeqpacket, Error as SysError, ScmSocket}; +use sys_util::{handle_eintr, net::UnixSeqpacket, Error as SysError, ScmSocket}; pub use crate::msg_on_socket::*; pub use msg_on_socket_derive::*; -- cgit 1.4.1