Skip to content

Commit

Permalink
Auto merge of rust-lang#128461 - matthiaskrgr:rollup-3dpp11g, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

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
  • Loading branch information
bors committed Aug 1, 2024
2 parents 1e3976b + 0607642 commit beb76c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/src/sync/once_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,7 @@ impl<T> OnceLock<T> {
/// Gets the mutable reference of the contents of the cell, initializing
/// it with `f` if the cell was empty.
///
/// Many threads may call `get_mut_or_init` concurrently with different
/// initializing functions, but it is guaranteed that only one function
/// will be executed.
/// This method never blocks.
///
/// # Panics
///
Expand Down Expand Up @@ -401,6 +399,8 @@ impl<T> OnceLock<T> {
/// it with `f` if the cell was empty. If the cell was empty and `f` failed,
/// an error is returned.
///
/// This method never blocks.
///
/// # Panics
///
/// If `f` panics, the panic is propagated to the caller, and
Expand Down

0 comments on commit beb76c3

Please sign in to comment.