diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-20 05:04:30 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-20 09:23:20 +1000 |
| commit | 665821cb606076bcf159c47e3e8e72a14fa512e3 (patch) | |
| tree | db964362cf069b4524672435bc689844377ff0c8 /library | |
| parent | 09006d6a88019b80f7158f1a5f754a358751d7f1 (diff) | |
| download | rust-665821cb606076bcf159c47e3e8e72a14fa512e3.tar.gz rust-665821cb606076bcf159c47e3e8e72a14fa512e3.zip | |
Add blank lines after module-level `//!` comments.
Most modules have such a blank line, but some don't. Inserting the blank line makes it clearer that the `//!` comments are describing the entire module, rather than the `use` declaration(s) that immediately follows.
Diffstat (limited to 'library')
| -rw-r--r-- | library/alloc/src/vec/in_place_collect.rs | 1 | ||||
| -rw-r--r-- | library/core/src/str/count.rs | 1 | ||||
| -rw-r--r-- | library/core/tests/iter/adapters/map_windows.rs | 1 | ||||
| -rw-r--r-- | library/core/tests/num/ieee754.rs | 1 | ||||
| -rw-r--r-- | library/panic_unwind/src/miri.rs | 1 | ||||
| -rw-r--r-- | library/portable-simd/crates/core_simd/src/ops/assign.rs | 1 | ||||
| -rw-r--r-- | library/portable-simd/crates/core_simd/src/ops/deref.rs | 1 | ||||
| -rw-r--r-- | library/std/src/hash/random.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/pal/itron/thread.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/pal/solid/abi/fs.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/pal/unix/process/process_unsupported/wait_status.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/pal/unix/thread.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/sync/condvar/itron.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/sync/mutex/itron.rs | 1 | ||||
| -rw-r--r-- | library/std/src/sys/sync/rwlock/solid.rs | 1 | ||||
| -rw-r--r-- | library/std/tests/create_dir_all_bare.rs | 1 | ||||
| -rw-r--r-- | library/test/src/bench.rs | 1 | ||||
| -rw-r--r-- | library/test/src/helpers/concurrency.rs | 1 | ||||
| -rw-r--r-- | library/test/src/helpers/metrics.rs | 1 |
19 files changed, 19 insertions, 0 deletions
diff --git a/library/alloc/src/vec/in_place_collect.rs b/library/alloc/src/vec/in_place_collect.rs index 22541a2b9d8..0dc193d82c5 100644 --- a/library/alloc/src/vec/in_place_collect.rs +++ b/library/alloc/src/vec/in_place_collect.rs @@ -154,6 +154,7 @@ //! } //! vec.truncate(write_idx); //! ``` + use crate::alloc::{handle_alloc_error, Global}; use core::alloc::Allocator; use core::alloc::Layout; diff --git a/library/core/src/str/count.rs b/library/core/src/str/count.rs index d8667864fe5..b5d7aaf05d4 100644 --- a/library/core/src/str/count.rs +++ b/library/core/src/str/count.rs @@ -17,6 +17,7 @@ //! Note: Because the term "leading byte" can sometimes be ambiguous (for //! example, it could also refer to the first byte of a slice), we'll often use //! the term "non-continuation byte" to refer to these bytes in the code. + use core::intrinsics::unlikely; const USIZE_SIZE: usize = core::mem::size_of::<usize>(); diff --git a/library/core/tests/iter/adapters/map_windows.rs b/library/core/tests/iter/adapters/map_windows.rs index 7fb2408f8ac..6744eff3fa2 100644 --- a/library/core/tests/iter/adapters/map_windows.rs +++ b/library/core/tests/iter/adapters/map_windows.rs @@ -3,6 +3,7 @@ use std::sync::atomic::{AtomicUsize, Ordering::SeqCst}; #[cfg(not(panic = "abort"))] mod drop_checks { //! These tests mainly make sure the elements are correctly dropped. + use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst}; #[derive(Debug)] diff --git a/library/core/tests/num/ieee754.rs b/library/core/tests/num/ieee754.rs index 48ab75b6f17..b0f6a7545aa 100644 --- a/library/core/tests/num/ieee754.rs +++ b/library/core/tests/num/ieee754.rs @@ -27,6 +27,7 @@ //! standard. That is why they accept wildly diverse inputs or may seem to duplicate other tests. //! Please consider this carefully when adding, removing, or reorganizing these tests. They are //! here so that it is clear what tests are required by the standard and what can be changed. + use ::core::str::FromStr; // IEEE 754 for many tests is applied to specific bit patterns. diff --git a/library/panic_unwind/src/miri.rs b/library/panic_unwind/src/miri.rs index 4d21e846010..695adadd59b 100644 --- a/library/panic_unwind/src/miri.rs +++ b/library/panic_unwind/src/miri.rs @@ -1,4 +1,5 @@ //! Unwinding panics for Miri. + use alloc::boxed::Box; use core::any::Any; diff --git a/library/portable-simd/crates/core_simd/src/ops/assign.rs b/library/portable-simd/crates/core_simd/src/ops/assign.rs index 0e87785025a..d21d867de26 100644 --- a/library/portable-simd/crates/core_simd/src/ops/assign.rs +++ b/library/portable-simd/crates/core_simd/src/ops/assign.rs @@ -1,4 +1,5 @@ //! Assignment operators + use super::*; use core::ops::{AddAssign, MulAssign}; // commutative binary op-assignment use core::ops::{BitAndAssign, BitOrAssign, BitXorAssign}; // commutative bit binary op-assignment diff --git a/library/portable-simd/crates/core_simd/src/ops/deref.rs b/library/portable-simd/crates/core_simd/src/ops/deref.rs index 89a60ba1141..0ff76cfba39 100644 --- a/library/portable-simd/crates/core_simd/src/ops/deref.rs +++ b/library/portable-simd/crates/core_simd/src/ops/deref.rs @@ -2,6 +2,7 @@ //! Ideally, Rust would take care of this itself, //! and method calls usually handle the LHS implicitly. //! But this is not the case with arithmetic ops. + use super::*; macro_rules! deref_lhs { diff --git a/library/std/src/hash/random.rs b/library/std/src/hash/random.rs index a1ccbb25369..0adf91e14ac 100644 --- a/library/std/src/hash/random.rs +++ b/library/std/src/hash/random.rs @@ -6,6 +6,7 @@ //! outside this crate. //! //! [`collections`]: crate::collections + #[allow(deprecated)] use super::{BuildHasher, Hasher, SipHasher13}; use crate::cell::Cell; diff --git a/library/std/src/sys/pal/itron/thread.rs b/library/std/src/sys/pal/itron/thread.rs index 205226ce1da..a0c8217128f 100644 --- a/library/std/src/sys/pal/itron/thread.rs +++ b/library/std/src/sys/pal/itron/thread.rs @@ -1,5 +1,6 @@ //! Thread implementation backed by μITRON tasks. Assumes `acre_tsk` and //! `exd_tsk` are available. + use super::{ abi, error::{expect_success, expect_success_aborting, ItronError}, diff --git a/library/std/src/sys/pal/solid/abi/fs.rs b/library/std/src/sys/pal/solid/abi/fs.rs index 49526f4c9cd..75efaaac2a9 100644 --- a/library/std/src/sys/pal/solid/abi/fs.rs +++ b/library/std/src/sys/pal/solid/abi/fs.rs @@ -1,4 +1,5 @@ //! `solid_fs.h` + use crate::os::raw::{c_char, c_int, c_uchar}; pub use libc::{ ino_t, off_t, stat, time_t, O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY, diff --git a/library/std/src/sys/pal/unix/process/process_unsupported/wait_status.rs b/library/std/src/sys/pal/unix/process/process_unsupported/wait_status.rs index e6dfadcf4a4..973188b1f2b 100644 --- a/library/std/src/sys/pal/unix/process/process_unsupported/wait_status.rs +++ b/library/std/src/sys/pal/unix/process/process_unsupported/wait_status.rs @@ -1,6 +1,7 @@ //! Emulated wait status for non-Unix #[cfg(unix) platforms //! //! Separate module to facilitate testing against a real Unix implementation. + use crate::ffi::c_int; use crate::fmt; use crate::num::NonZero; diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index 1ab54ec57c3..3ebf1cfd33f 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -475,6 +475,7 @@ mod cgroups { //! * cgroup v2 in non-standard mountpoints //! * paths containing control characters or spaces, since those would be escaped in procfs //! output and we don't unescape + use crate::borrow::Cow; use crate::ffi::OsString; use crate::fs::{try_exists, File}; diff --git a/library/std/src/sys/sync/condvar/itron.rs b/library/std/src/sys/sync/condvar/itron.rs index 9b64d241efd..3a3039889e9 100644 --- a/library/std/src/sys/sync/condvar/itron.rs +++ b/library/std/src/sys/sync/condvar/itron.rs @@ -1,4 +1,5 @@ //! POSIX conditional variable implementation based on user-space wait queues. + use crate::sys::pal::itron::{ abi, error::expect_success_aborting, spin::SpinMutex, task, time::with_tmos_strong, }; diff --git a/library/std/src/sys/sync/mutex/itron.rs b/library/std/src/sys/sync/mutex/itron.rs index a134eb2d1be..4ba32a8fbcd 100644 --- a/library/std/src/sys/sync/mutex/itron.rs +++ b/library/std/src/sys/sync/mutex/itron.rs @@ -1,5 +1,6 @@ //! Mutex implementation backed by μITRON mutexes. Assumes `acre_mtx` and //! `TA_INHERIT` are available. + use crate::sys::pal::itron::{ abi, error::{expect_success, expect_success_aborting, fail, ItronError}, diff --git a/library/std/src/sys/sync/rwlock/solid.rs b/library/std/src/sys/sync/rwlock/solid.rs index 9bf6f5dbb73..7558eee8edd 100644 --- a/library/std/src/sys/sync/rwlock/solid.rs +++ b/library/std/src/sys/sync/rwlock/solid.rs @@ -1,4 +1,5 @@ //! A readers-writer lock implementation backed by the SOLID kernel extension. + use crate::sys::pal::{ abi, itron::{ diff --git a/library/std/tests/create_dir_all_bare.rs b/library/std/tests/create_dir_all_bare.rs index fd2a7f906f8..79c3c8f528e 100644 --- a/library/std/tests/create_dir_all_bare.rs +++ b/library/std/tests/create_dir_all_bare.rs @@ -2,6 +2,7 @@ //! Note that this test changes the current directory so //! should not be in the same process as other tests. + use std::env; use std::fs; use std::path::{Path, PathBuf}; diff --git a/library/test/src/bench.rs b/library/test/src/bench.rs index 64ca13c0d4e..9f34f54c3d6 100644 --- a/library/test/src/bench.rs +++ b/library/test/src/bench.rs @@ -1,4 +1,5 @@ //! Benchmarking module. + use super::{ event::CompletedTest, options::BenchMode, diff --git a/library/test/src/helpers/concurrency.rs b/library/test/src/helpers/concurrency.rs index b395adcf885..1854c6a7652 100644 --- a/library/test/src/helpers/concurrency.rs +++ b/library/test/src/helpers/concurrency.rs @@ -1,5 +1,6 @@ //! Helper module which helps to determine amount of threads to be used //! during tests execution. + use std::{env, num::NonZero, thread}; pub fn get_concurrency() -> usize { diff --git a/library/test/src/helpers/metrics.rs b/library/test/src/helpers/metrics.rs index f77a23e6875..bc38969cefb 100644 --- a/library/test/src/helpers/metrics.rs +++ b/library/test/src/helpers/metrics.rs @@ -1,4 +1,5 @@ //! Benchmark metrics. + use std::collections::BTreeMap; #[derive(Clone, PartialEq, Debug, Copy)] |
