diff options
author | David Tolnay <dtolnay@chromium.org> | 2019-04-12 12:18:35 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-15 02:06:07 -0700 |
commit | 633426a8fc20a5eef402e159d53228aae13bbaa5 (patch) | |
tree | ddc7e53a2baeebd3fdd15d724107e7f018de4dc4 /bit_field | |
parent | 62041f041956a2ccfdd0a340b65b8a2cb0749655 (diff) | |
download | crosvm-633426a8fc20a5eef402e159d53228aae13bbaa5.tar crosvm-633426a8fc20a5eef402e159d53228aae13bbaa5.tar.gz crosvm-633426a8fc20a5eef402e159d53228aae13bbaa5.tar.bz2 crosvm-633426a8fc20a5eef402e159d53228aae13bbaa5.tar.lz crosvm-633426a8fc20a5eef402e159d53228aae13bbaa5.tar.xz crosvm-633426a8fc20a5eef402e159d53228aae13bbaa5.tar.zst crosvm-633426a8fc20a5eef402e159d53228aae13bbaa5.zip |
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 <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>
Diffstat (limited to 'bit_field')
-rw-r--r-- | bit_field/bit_field_derive/bit_field_derive.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bit_field/bit_field_derive/bit_field_derive.rs b/bit_field/bit_field_derive/bit_field_derive.rs index 0bd0daf..e7d26cd 100644 --- a/bit_field/bit_field_derive/bit_field_derive.rs +++ b/bit_field/bit_field_derive/bit_field_derive.rs @@ -13,10 +13,11 @@ extern crate quote; extern crate syn; use proc_macro2::{Span, TokenStream}; +use quote::{quote, quote_spanned}; use syn::parse::{Error, Result}; use syn::{ - Attribute, Data, DataEnum, DeriveInput, Fields, FieldsNamed, FieldsUnnamed, Ident, Lit, LitInt, - Meta, Type, Visibility, + parse_macro_input, Attribute, Data, DataEnum, DeriveInput, Fields, FieldsNamed, FieldsUnnamed, + Ident, Lit, LitInt, Meta, Type, Visibility, }; /// The function that derives the actual implementation. @@ -654,6 +655,7 @@ pub fn define_bit_field_specifiers(_input: proc_macro::TokenStream) -> proc_macr #[cfg(test)] mod tests { use super::*; + use syn::parse_quote; #[test] fn end_to_end() { |