Skip to content

Commit

Permalink
Unrolled build for rust-lang#130448
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#130448 - alilleybrinker:master, r=workingjubilee

fix: Remove duplicate `LazyLock` example.

The top-level docs for `LazyLock` included two lines of code, each with an accompanying comment, that were identical and with nearly- identical comments. This looks like an oversight from a past edit which was perhaps trying to rewrite an existing example but ended up duplicating rather than replacing, though I haven't gone back through the Git history to check.

This commit removes what I personally think is the less-clear of the two examples.
  • Loading branch information
rust-timer authored Sep 17, 2024
2 parents e2dc1a1 + 23e4e98 commit 67eab0b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions library/std/src/sync/lazy_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ union Data<T, F> {
///
/// // The `String` is built, stored in the `LazyLock`, and returned as `&String`.
/// let _ = &*DEEP_THOUGHT;
/// // The `String` is retrieved from the `LazyLock` and returned as `&String`.
/// let _ = &*DEEP_THOUGHT;
/// ```
///
/// Initialize fields with `LazyLock`.
Expand Down

0 comments on commit 67eab0b

Please sign in to comment.