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 --- gpu_display/build.rs | 2 -- gpu_display/examples/simple.rs | 2 -- gpu_display/src/lib.rs | 3 --- 3 files changed, 7 deletions(-) (limited to 'gpu_display') diff --git a/gpu_display/build.rs b/gpu_display/build.rs index 33a8653..69c0fae 100644 --- a/gpu_display/build.rs +++ b/gpu_display/build.rs @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -extern crate cc; - use std::env; use std::ffi::OsStr; use std::fs; diff --git a/gpu_display/examples/simple.rs b/gpu_display/examples/simple.rs index e3499f8..fcf2e54 100644 --- a/gpu_display/examples/simple.rs +++ b/gpu_display/examples/simple.rs @@ -1,5 +1,3 @@ -extern crate gpu_display; - use gpu_display::*; fn main() { diff --git a/gpu_display/src/lib.rs b/gpu_display/src/lib.rs index c52e5e9..11a6703 100644 --- a/gpu_display/src/lib.rs +++ b/gpu_display/src/lib.rs @@ -4,9 +4,6 @@ //! Crate for displaying simple surfaces and GPU buffers over wayland. -extern crate data_model; -extern crate sys_util; - mod dwl; use std::cell::Cell; -- cgit 1.4.1