Skip to content

Commit beb76c3

Browse files
committed
Auto merge of rust-lang#128461 - matthiaskrgr:rollup-3dpp11g, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#123813 (Add `REDUNDANT_IMPORTS` lint for new redundant import detection) - rust-lang#126697 ([RFC] mbe: consider the `_` in 2024 an expression) - rust-lang#127159 (match lowering: Hide `Candidate` from outside the lowering algorithm) - rust-lang#128244 (Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck, remove some hacks) - rust-lang#128431 (Add myself as VxWorks target maintainer for reference) - rust-lang#128438 (Add special-case for [T, 0] in dropck_outlives) - rust-lang#128457 (Fix docs for OnceLock::get_mut_or_init) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1e3976b + 0607642 commit beb76c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

std/src/sync/once_lock.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,7 @@ impl<T> OnceLock<T> {
309309
/// Gets the mutable reference of the contents of the cell, initializing
310310
/// it with `f` if the cell was empty.
311311
///
312-
/// Many threads may call `get_mut_or_init` concurrently with different
313-
/// initializing functions, but it is guaranteed that only one function
314-
/// will be executed.
312+
/// This method never blocks.
315313
///
316314
/// # Panics
317315
///
@@ -401,6 +399,8 @@ impl<T> OnceLock<T> {
401399
/// it with `f` if the cell was empty. If the cell was empty and `f` failed,
402400
/// an error is returned.
403401
///
402+
/// This method never blocks.
403+
///
404404
/// # Panics
405405
///
406406
/// If `f` panics, the panic is propagated to the caller, and

0 commit comments

Comments
 (0)