Skip to content

Remove unused crate imports in 2018 edition crates #73638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/liballoc/collections/vec_deque/tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use super::*;

use test;

#[bench]
#[cfg_attr(miri, ignore)] // isolated Miri does not support benchmarks
fn bench_push_back_100(b: &mut test::Bencher) {
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_pretty/pprust/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use super::*;

use rustc_ast::ast;
use rustc_ast::with_default_globals;
use rustc_span;
use rustc_span::source_map::respan;
use rustc_span::symbol::Ident;

Expand Down
1 change: 0 additions & 1 deletion src/librustc_data_structures/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ cfg_if! {
use parking_lot::Mutex as InnerLock;
use parking_lot::RwLock as InnerRwLock;

use std;
use std::thread;
pub use rayon::{join, scope};

Expand Down
2 changes: 0 additions & 2 deletions src/libstd/os/illumos/fs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![stable(feature = "metadata_ext", since = "1.1.0")]

use libc;

use crate::fs::Metadata;
use crate::sys_common::AsInner;

Expand Down
3 changes: 0 additions & 3 deletions src/libstd/sys/unix/ext/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

//! Unix-specific networking functionality

#[cfg(unix)]
use libc;

// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here?
#[cfg(not(unix))]
#[allow(non_camel_case_types)]
Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/vxworks/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ mod imp {
use crate::ffi::{CStr, OsString};
use crate::marker::PhantomData;
use crate::ptr;
use libc;

use crate::sys_common::mutex::Mutex;

Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/vxworks/ext/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::path::Path;
use crate::sys;
use crate::sys::platform::fs::MetadataExt as UnixMetadataExt;
use crate::sys_common::{AsInner, AsInnerMut, FromInner};
use libc;

/// Unix-specific extensions to [`File`].
///
Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/vxworks/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub fn hashmap_random_keys() -> (u64, u64) {
mod imp {
use crate::io;
use core::sync::atomic::{AtomicBool, Ordering::Relaxed};
use libc;

pub fn fill_bytes(v: &mut [u8]) {
static RNG_INIT: AtomicBool = AtomicBool::new(false);
Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/vxworks/rwlock.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::cell::UnsafeCell;
use crate::sync::atomic::{AtomicUsize, Ordering};
use libc;

pub struct RWLock {
inner: UnsafeCell<libc::pthread_rwlock_t>,
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/sys/vxworks/time.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::cmp::Ordering;
use crate::time::Duration;
use ::core::hash::{Hash, Hasher};
use libc;

pub use self::inner::{Instant, SystemTime, UNIX_EPOCH};
use crate::convert::TryInto;
Expand Down Expand Up @@ -104,7 +103,6 @@ mod inner {
use crate::fmt;
use crate::sys::cvt;
use crate::time::Duration;
use libc;

use super::Timespec;

Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/wasi/alloc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::alloc::{GlobalAlloc, Layout, System};
use crate::ptr;
use crate::sys_common::alloc::{realloc_fallback, MIN_ALIGN};
use libc;

#[stable(feature = "alloc_system_type", since = "1.28.0")]
unsafe impl GlobalAlloc for System {
Expand Down
1 change: 0 additions & 1 deletion src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#![deny(warnings)]

use serde::Serialize;
use toml;

use std::collections::BTreeMap;
use std::collections::HashMap;
Expand Down
1 change: 0 additions & 1 deletion src/tools/compiletest/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use crate::errors::{Error, ErrorKind};
use crate::runtest::ProcRes;
use serde::Deserialize;
use serde_json;
use std::path::{Path, PathBuf};
use std::str::FromStr;

Expand Down
2 changes: 0 additions & 2 deletions src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ extern crate test;
use crate::common::{expected_output_path, output_base_dir, output_relative_path, UI_EXTENSIONS};
use crate::common::{CompareMode, Config, Debugger, Mode, PassMode, Pretty, TestPaths};
use crate::util::logv;
use env_logger;
use getopts;
use getopts::Options;
use log::*;
use std::env;
Expand Down
1 change: 0 additions & 1 deletion src/tools/compiletest/src/read2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ mod imp {

#[cfg(unix)]
mod imp {
use libc;
use std::io;
use std::io::prelude::*;
use std::mem;
Expand Down
1 change: 0 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use crate::header::TestProps;
use crate::json;
use crate::util::get_pointer_width;
use crate::util::{logv, PathBufExt};
use diff;
use regex::{Captures, Regex};
use rustfix::{apply_suggestions, get_suggestions_from_json, Filter};

Expand Down