diff options
| author | bors <bors@rust-lang.org> | 2023-12-12 07:09:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-12 07:09:19 +0000 |
| commit | fda521a988749458326ecef2e92e979077727a4e (patch) | |
| tree | 73ec9f26b38eb86b5676735f79e577c12fe0024a /library/std/src | |
| parent | aaeb4dd3a93a6be4cba5eb173f35453803994773 (diff) | |
| parent | 03b7ed06c88ae869daa4f2a30ef341918cc76ac7 (diff) | |
| download | rust-fda521a988749458326ecef2e92e979077727a4e.tar.gz rust-fda521a988749458326ecef2e92e979077727a4e.zip | |
Auto merge of #3223 - rust-lang:rustup-2023-12-12, r=RalfJung
Automatic Rustup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/backtrace.rs | 1 | ||||
| -rw-r--r-- | library/std/src/backtrace/tests.rs | 2 | ||||
| -rw-r--r-- | library/std/src/env/tests.rs | 2 | ||||
| -rw-r--r-- | library/std/src/ffi/os_str/tests.rs | 4 | ||||
| -rw-r--r-- | library/std/src/io/error/repr_bitpacked.rs | 1 | ||||
| -rw-r--r-- | library/std/src/io/error/repr_unpacked.rs | 1 | ||||
| -rw-r--r-- | library/std/src/net/tcp/tests.rs | 2 | ||||
| -rw-r--r-- | library/std/src/net/udp/tests.rs | 1 | ||||
| -rw-r--r-- | library/std/src/path/tests.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sync/mpsc/sync_tests.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sync/mpsc/tests.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sync/mutex.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys_common/thread.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys_common/wtf8/tests.rs | 1 |
14 files changed, 5 insertions, 20 deletions
diff --git a/library/std/src/backtrace.rs b/library/std/src/backtrace.rs index 7fcf2ee358c..9638f491987 100644 --- a/library/std/src/backtrace.rs +++ b/library/std/src/backtrace.rs @@ -96,7 +96,6 @@ use crate::panic::UnwindSafe; use crate::sync::atomic::{AtomicUsize, Ordering::Relaxed}; use crate::sync::LazyLock; use crate::sys_common::backtrace::{lock, output_filename, set_image_base}; -use crate::vec::Vec; /// A captured OS thread stack backtrace. /// diff --git a/library/std/src/backtrace/tests.rs b/library/std/src/backtrace/tests.rs index 73543a3af54..174d62813bd 100644 --- a/library/std/src/backtrace/tests.rs +++ b/library/std/src/backtrace/tests.rs @@ -1,5 +1,5 @@ use super::*; -use crate::panic::{RefUnwindSafe, UnwindSafe}; +use crate::panic::RefUnwindSafe; fn generate_fake_frames() -> Vec<BacktraceFrame> { vec![ diff --git a/library/std/src/env/tests.rs b/library/std/src/env/tests.rs index 55869229581..fc7aee29733 100644 --- a/library/std/src/env/tests.rs +++ b/library/std/src/env/tests.rs @@ -1,7 +1,5 @@ use super::*; -use crate::path::Path; - #[test] #[cfg_attr(any(target_os = "emscripten", target_env = "sgx"), ignore)] fn test_self_exe_path() { diff --git a/library/std/src/ffi/os_str/tests.rs b/library/std/src/ffi/os_str/tests.rs index 2765398d3e6..60cde376d32 100644 --- a/library/std/src/ffi/os_str/tests.rs +++ b/library/std/src/ffi/os_str/tests.rs @@ -1,8 +1,4 @@ use super::*; -use crate::sys_common::{AsInner, IntoInner}; - -use crate::rc::Rc; -use crate::sync::Arc; #[test] fn test_os_string_with_capacity() { diff --git a/library/std/src/io/error/repr_bitpacked.rs b/library/std/src/io/error/repr_bitpacked.rs index 6e7366b3635..db175659770 100644 --- a/library/std/src/io/error/repr_bitpacked.rs +++ b/library/std/src/io/error/repr_bitpacked.rs @@ -103,7 +103,6 @@ //! the time. use super::{Custom, ErrorData, ErrorKind, RawOsError, SimpleMessage}; -use alloc::boxed::Box; use core::marker::PhantomData; use core::mem::{align_of, size_of}; use core::ptr::{self, NonNull}; diff --git a/library/std/src/io/error/repr_unpacked.rs b/library/std/src/io/error/repr_unpacked.rs index 093fde33757..dc8a95577c9 100644 --- a/library/std/src/io/error/repr_unpacked.rs +++ b/library/std/src/io/error/repr_unpacked.rs @@ -3,7 +3,6 @@ //! would have no benefit. use super::{Custom, ErrorData, ErrorKind, RawOsError, SimpleMessage}; -use alloc::boxed::Box; type Inner = ErrorData<Box<Custom>>; diff --git a/library/std/src/net/tcp/tests.rs b/library/std/src/net/tcp/tests.rs index db367cfa0f7..b24b851a645 100644 --- a/library/std/src/net/tcp/tests.rs +++ b/library/std/src/net/tcp/tests.rs @@ -1,6 +1,6 @@ use crate::fmt; use crate::io::prelude::*; -use crate::io::{BorrowedBuf, ErrorKind, IoSlice, IoSliceMut}; +use crate::io::{BorrowedBuf, IoSlice, IoSliceMut}; use crate::mem::MaybeUninit; use crate::net::test::{next_test_ip4, next_test_ip6}; use crate::net::*; diff --git a/library/std/src/net/udp/tests.rs b/library/std/src/net/udp/tests.rs index 892fe2ba8ba..0cf99366452 100644 --- a/library/std/src/net/udp/tests.rs +++ b/library/std/src/net/udp/tests.rs @@ -1,4 +1,3 @@ -use crate::io::ErrorKind; use crate::net::test::{next_test_ip4, next_test_ip6}; use crate::net::*; use crate::sync::mpsc::channel; diff --git a/library/std/src/path/tests.rs b/library/std/src/path/tests.rs index dbc0f7d9df3..fde6ed4f0c0 100644 --- a/library/std/src/path/tests.rs +++ b/library/std/src/path/tests.rs @@ -1,9 +1,7 @@ use super::*; use crate::collections::{BTreeSet, HashSet}; -use crate::hash::{DefaultHasher, Hasher}; -use crate::rc::Rc; -use crate::sync::Arc; +use crate::hash::DefaultHasher; use core::hint::black_box; #[allow(unknown_lints, unused_macro_rules)] diff --git a/library/std/src/sync/mpsc/sync_tests.rs b/library/std/src/sync/mpsc/sync_tests.rs index 632709fd98d..945de280f40 100644 --- a/library/std/src/sync/mpsc/sync_tests.rs +++ b/library/std/src/sync/mpsc/sync_tests.rs @@ -3,7 +3,6 @@ use crate::env; use crate::rc::Rc; use crate::sync::mpmc::SendTimeoutError; use crate::thread; -use crate::time::Duration; pub fn stress_factor() -> usize { match env::var("RUST_TEST_STRESS") { diff --git a/library/std/src/sync/mpsc/tests.rs b/library/std/src/sync/mpsc/tests.rs index 1e52a4a705c..ac1a804cf9c 100644 --- a/library/std/src/sync/mpsc/tests.rs +++ b/library/std/src/sync/mpsc/tests.rs @@ -1,7 +1,6 @@ use super::*; use crate::env; use crate::thread; -use crate::time::{Duration, Instant}; pub fn stress_factor() -> usize { match env::var("RUST_TEST_STRESS") { diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs index b4ae6b7e07e..0c001d7c258 100644 --- a/library/std/src/sync/mutex.rs +++ b/library/std/src/sync/mutex.rs @@ -146,7 +146,7 @@ use crate::sys::locks as sys; /// let result = data.iter().fold(0, |acc, x| acc + x * 2); /// data.push(result); /// // We drop the `data` explicitly because it's not necessary anymore and the -/// // thread still has work to do. This allow other threads to start working on +/// // thread still has work to do. This allows other threads to start working on /// // the data immediately, without waiting for the rest of the unrelated work /// // to be done here. /// // diff --git a/library/std/src/sys_common/thread.rs b/library/std/src/sys_common/thread.rs index 76466b2b37b..8f5624bbce9 100644 --- a/library/std/src/sys_common/thread.rs +++ b/library/std/src/sys_common/thread.rs @@ -8,7 +8,7 @@ pub fn min_stack() -> usize { 0 => {} n => return n - 1, } - let amt = env::var("RUST_MIN_STACK").ok().and_then(|s| s.parse().ok()); + let amt = env::var_os("RUST_MIN_STACK").and_then(|s| s.to_str().and_then(|s| s.parse().ok())); let amt = amt.unwrap_or(imp::DEFAULT_MIN_STACK_SIZE); // 0 is our sentinel value, so ensure that we'll never see 0 after diff --git a/library/std/src/sys_common/wtf8/tests.rs b/library/std/src/sys_common/wtf8/tests.rs index a07bbe6d7e4..28a426648e5 100644 --- a/library/std/src/sys_common/wtf8/tests.rs +++ b/library/std/src/sys_common/wtf8/tests.rs @@ -1,5 +1,4 @@ use super::*; -use crate::borrow::Cow; #[test] fn code_point_from_u32() { |
