diff options
author | David Tolnay <dtolnay@chromium.org> | 2019-04-11 14:30:00 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-15 02:06:08 -0700 |
commit | aecf9a4dee6c004bceabf268a5b36d24c3744ca6 (patch) | |
tree | f43a4fae670c5e3366d30d405b8f603d44a6464f /fuzz | |
parent | 633426a8fc20a5eef402e159d53228aae13bbaa5 (diff) | |
download | crosvm-aecf9a4dee6c004bceabf268a5b36d24c3744ca6.tar crosvm-aecf9a4dee6c004bceabf268a5b36d24c3744ca6.tar.gz crosvm-aecf9a4dee6c004bceabf268a5b36d24c3744ca6.tar.bz2 crosvm-aecf9a4dee6c004bceabf268a5b36d24c3744ca6.tar.lz crosvm-aecf9a4dee6c004bceabf268a5b36d24c3744ca6.tar.xz crosvm-aecf9a4dee6c004bceabf268a5b36d24c3744ca6.tar.zst crosvm-aecf9a4dee6c004bceabf268a5b36d24c3744ca6.zip |
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 <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 'fuzz')
-rw-r--r-- | fuzz/block_fuzzer.rs | 6 | ||||
-rw-r--r-- | fuzz/qcow_fuzzer.rs | 3 | ||||
-rw-r--r-- | fuzz/zimage_fuzzer.rs | 3 |
3 files changed, 1 insertions, 11 deletions
diff --git a/fuzz/block_fuzzer.rs b/fuzz/block_fuzzer.rs index 5c3106a..f315a87 100644 --- a/fuzz/block_fuzzer.rs +++ b/fuzz/block_fuzzer.rs @@ -3,11 +3,6 @@ // found in the LICENSE file. #![no_main] -extern crate devices; -extern crate libc; -extern crate sys_util; - -use sys_util::{EventFd, GuestAddress, GuestMemory, SharedMemory}; use std::fs::File; use std::io::{Cursor, Read, Seek, SeekFrom}; @@ -20,6 +15,7 @@ use std::sync::atomic::AtomicUsize; use std::sync::Arc; use devices::virtio::{Block, Queue, VirtioDevice}; +use sys_util::{EventFd, GuestAddress, GuestMemory, SharedMemory}; const MEM_SIZE: u64 = 256 * 1024 * 1024; const DESC_SIZE: u64 = 16; // Bytes in one virtio descriptor. diff --git a/fuzz/qcow_fuzzer.rs b/fuzz/qcow_fuzzer.rs index 0f7ff2a..e6175ff 100644 --- a/fuzz/qcow_fuzzer.rs +++ b/fuzz/qcow_fuzzer.rs @@ -3,9 +3,6 @@ // found in the LICENSE file. #![no_main] -extern crate libc; -extern crate qcow; -extern crate sys_util; use qcow::QcowFile; use sys_util::SharedMemory; diff --git a/fuzz/zimage_fuzzer.rs b/fuzz/zimage_fuzzer.rs index 13b67b3..fdcb7db 100644 --- a/fuzz/zimage_fuzzer.rs +++ b/fuzz/zimage_fuzzer.rs @@ -3,9 +3,6 @@ // found in the LICENSE file. #![no_main] -extern crate kernel_loader; -extern crate libc; -extern crate sys_util; use sys_util::{GuestAddress, GuestMemory}; |