From aecf9a4dee6c004bceabf268a5b36d24c3744ca6 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 11 Apr 2019 14:30:00 -0700 Subject: edition: Remove extern crate lines In Rust 2018 edition, `extern crate` is no longer required for importing from other crates. Instead of writing: extern crate dep; use dep::Thing; we write: use dep::Thing; In this approach, macros are imported individually from the declaring crate rather than through #[macro_use]. Before: #[macro_use] extern crate sys_util; After: use sys_util::{debug, error}; The only place that `extern crate` continues to be required is in importing the compiler's proc_macro API into a procedural macro crate. This will hopefully be fixed in a future Rust release. extern crate proc_macro; TEST=cargo check TEST=cargo check --all-features TEST=cargo check --target aarch64-unknown-linux-gnu TEST=local kokoro Change-Id: I0b43768c0d81f2a250b1959fb97ba35cbac56293 Reviewed-on: https://chromium-review.googlesource.com/1565302 Commit-Ready: David Tolnay Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: David Tolnay --- kvm/tests/dirty_log.rs | 4 ---- kvm/tests/read_only_memory.rs | 4 ---- kvm/tests/real_run_adder.rs | 4 ---- 3 files changed, 12 deletions(-) (limited to 'kvm/tests') diff --git a/kvm/tests/dirty_log.rs b/kvm/tests/dirty_log.rs index 645a01d..4efb208 100644 --- a/kvm/tests/dirty_log.rs +++ b/kvm/tests/dirty_log.rs @@ -4,10 +4,6 @@ #![cfg(any(target_arch = "x86", target_arch = "x86_64"))] -extern crate kvm; -extern crate kvm_sys; -extern crate sys_util; - use kvm::*; use kvm_sys::kvm_regs; use sys_util::{GuestAddress, GuestMemory, MemoryMapping, SharedMemory}; diff --git a/kvm/tests/read_only_memory.rs b/kvm/tests/read_only_memory.rs index 5114ce4..c1dd854 100644 --- a/kvm/tests/read_only_memory.rs +++ b/kvm/tests/read_only_memory.rs @@ -4,10 +4,6 @@ #![cfg(any(target_arch = "x86", target_arch = "x86_64"))] -extern crate kvm; -extern crate kvm_sys; -extern crate sys_util; - use kvm::*; use kvm_sys::kvm_regs; use sys_util::{GuestAddress, GuestMemory, MemoryMapping, SharedMemory}; diff --git a/kvm/tests/real_run_adder.rs b/kvm/tests/real_run_adder.rs index 5a7b536..a419ad9 100644 --- a/kvm/tests/real_run_adder.rs +++ b/kvm/tests/real_run_adder.rs @@ -4,10 +4,6 @@ #![cfg(any(target_arch = "x86", target_arch = "x86_64"))] -extern crate kvm; -extern crate kvm_sys; -extern crate sys_util; - use kvm::*; use kvm_sys::kvm_regs; use sys_util::{GuestAddress, GuestMemory}; -- cgit 1.4.1