Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 992bbf7

Browse files
authoredNov 12, 2024
Rollup merge of rust-lang#132869 - lolbinarycat:library-fix-too_long_first_doc_paragraph, r=tgross35
split up the first paragraph of doc comments for better summaries used `./x clippy -Aclippy::all '-Wclippy::too_long_first_doc_paragraph' library/core library/alloc` to find these issues.
2 parents e3925fa + b9be1dd commit 992bbf7

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed
 

‎alloc/src/rc.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2932,7 +2932,9 @@ impl<T, I: iter::TrustedLen<Item = T>> ToRcSlice<T> for I {
29322932
}
29332933

29342934
/// `Weak` is a version of [`Rc`] that holds a non-owning reference to the
2935-
/// managed allocation. The allocation is accessed by calling [`upgrade`] on the `Weak`
2935+
/// managed allocation.
2936+
///
2937+
/// The allocation is accessed by calling [`upgrade`] on the `Weak`
29362938
/// pointer, which returns an <code>[Option]<[Rc]\<T>></code>.
29372939
///
29382940
/// Since a `Weak` reference does not count towards ownership, it will not

‎alloc/src/sync.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
291291
}
292292

293293
/// `Weak` is a version of [`Arc`] that holds a non-owning reference to the
294-
/// managed allocation. The allocation is accessed by calling [`upgrade`] on the `Weak`
294+
/// managed allocation.
295+
///
296+
/// The allocation is accessed by calling [`upgrade`] on the `Weak`
295297
/// pointer, which returns an <code>[Option]<[Arc]\<T>></code>.
296298
///
297299
/// Since a `Weak` reference does not count towards ownership, it will not

‎alloc/src/task.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,11 @@ fn raw_waker<W: Wake + Send + Sync + 'static>(waker: Arc<W>) -> RawWaker {
176176
)
177177
}
178178

179-
/// An analogous trait to `Wake` but used to construct a `LocalWaker`. This API
180-
/// works in exactly the same way as `Wake`, except that it uses an `Rc` instead
181-
/// of an `Arc`, and the result is a `LocalWaker` instead of a `Waker`.
179+
/// An analogous trait to `Wake` but used to construct a `LocalWaker`.
180+
///
181+
/// This API works in exactly the same way as `Wake`,
182+
/// except that it uses an `Rc` instead of an `Arc`,
183+
/// and the result is a `LocalWaker` instead of a `Waker`.
182184
///
183185
/// The benefits of using `LocalWaker` over `Waker` are that it allows the local waker
184186
/// to hold data that does not implement `Send` and `Sync`. Additionally, it saves calls

‎std/src/sync/mpmc/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ use crate::panic::{RefUnwindSafe, UnwindSafe};
153153
use crate::time::{Duration, Instant};
154154

155155
/// Creates a new asynchronous channel, returning the sender/receiver halves.
156+
///
156157
/// All data sent on the [`Sender`] will become available on the [`Receiver`] in
157158
/// the same order as it was sent, and no [`send`] will block the calling thread
158159
/// (this channel has an "infinite buffer", unlike [`sync_channel`], which will
@@ -201,6 +202,7 @@ pub fn channel<T>() -> (Sender<T>, Receiver<T>) {
201202
}
202203

203204
/// Creates a new synchronous, bounded channel.
205+
///
204206
/// All data sent on the [`Sender`] will become available on the [`Receiver`]
205207
/// in the same order as it was sent. Like asynchronous [`channel`]s, the
206208
/// [`Receiver`] will block until a message becomes available. `sync_channel`

‎std/src/sync/mpsc/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ pub enum TrySendError<T> {
483483
}
484484

485485
/// Creates a new asynchronous channel, returning the sender/receiver halves.
486+
///
486487
/// All data sent on the [`Sender`] will become available on the [`Receiver`] in
487488
/// the same order as it was sent, and no [`send`] will block the calling thread
488489
/// (this channel has an "infinite buffer", unlike [`sync_channel`], which will
@@ -527,6 +528,7 @@ pub fn channel<T>() -> (Sender<T>, Receiver<T>) {
527528
}
528529

529530
/// Creates a new synchronous, bounded channel.
531+
///
530532
/// All data sent on the [`SyncSender`] will become available on the [`Receiver`]
531533
/// in the same order as it was sent. Like asynchronous [`channel`]s, the
532534
/// [`Receiver`] will block until a message becomes available. `sync_channel`

0 commit comments

Comments
 (0)
Failed to load comments.