Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 38c85b7

Browse files
authored
Rollup merge of rust-lang#73638 - yuqio:remove-unused-crate-imports, r=nikomatsakis
Remove unused crate imports in 2018 edition crates Closes rust-lang#73570
2 parents 3c90ae8 + 9267b4f commit 38c85b7

File tree

16 files changed

+0
-22
lines changed

16 files changed

+0
-22
lines changed

src/liballoc/collections/vec_deque/tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use super::*;
22

3-
use test;
4-
53
#[bench]
64
#[cfg_attr(miri, ignore)] // isolated Miri does not support benchmarks
75
fn bench_push_back_100(b: &mut test::Bencher) {

src/librustc_ast_pretty/pprust/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use super::*;
22

33
use rustc_ast::ast;
44
use rustc_ast::with_default_globals;
5-
use rustc_span;
65
use rustc_span::source_map::respan;
76
use rustc_span::symbol::Ident;
87

src/librustc_data_structures/sync.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ cfg_if! {
358358
use parking_lot::Mutex as InnerLock;
359359
use parking_lot::RwLock as InnerRwLock;
360360

361-
use std;
362361
use std::thread;
363362
pub use rayon::{join, scope};
364363

src/libstd/os/illumos/fs.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![stable(feature = "metadata_ext", since = "1.1.0")]
22

3-
use libc;
4-
53
use crate::fs::Metadata;
64
use crate::sys_common::AsInner;
75

src/libstd/sys/unix/ext/net.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Unix-specific networking functionality
44
5-
#[cfg(unix)]
6-
use libc;
7-
85
// FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here?
96
#[cfg(not(unix))]
107
#[allow(non_camel_case_types)]

src/libstd/sys/vxworks/args.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ mod imp {
5656
use crate::ffi::{CStr, OsString};
5757
use crate::marker::PhantomData;
5858
use crate::ptr;
59-
use libc;
6059

6160
use crate::sys_common::mutex::Mutex;
6261

src/libstd/sys/vxworks/ext/fs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::path::Path;
66
use crate::sys;
77
use crate::sys::platform::fs::MetadataExt as UnixMetadataExt;
88
use crate::sys_common::{AsInner, AsInnerMut, FromInner};
9-
use libc;
109

1110
/// Unix-specific extensions to [`File`].
1211
///

src/libstd/sys/vxworks/rand.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ pub fn hashmap_random_keys() -> (u64, u64) {
1313
mod imp {
1414
use crate::io;
1515
use core::sync::atomic::{AtomicBool, Ordering::Relaxed};
16-
use libc;
1716

1817
pub fn fill_bytes(v: &mut [u8]) {
1918
static RNG_INIT: AtomicBool = AtomicBool::new(false);

src/libstd/sys/vxworks/rwlock.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::cell::UnsafeCell;
22
use crate::sync::atomic::{AtomicUsize, Ordering};
3-
use libc;
43

54
pub struct RWLock {
65
inner: UnsafeCell<libc::pthread_rwlock_t>,

src/libstd/sys/vxworks/time.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::cmp::Ordering;
22
use crate::time::Duration;
33
use ::core::hash::{Hash, Hasher};
4-
use libc;
54

65
pub use self::inner::{Instant, SystemTime, UNIX_EPOCH};
76
use crate::convert::TryInto;
@@ -104,7 +103,6 @@ mod inner {
104103
use crate::fmt;
105104
use crate::sys::cvt;
106105
use crate::time::Duration;
107-
use libc;
108106

109107
use super::Timespec;
110108

0 commit comments

Comments
 (0)