Skip to content

Commit e80d16c

Browse files
authored
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.
2 parents 2819604 + 49a855d commit e80d16c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

std/src/sync/lazy_lock.rs

-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ union Data<T, F> {
4444
///
4545
/// // The `String` is built, stored in the `LazyLock`, and returned as `&String`.
4646
/// let _ = &*DEEP_THOUGHT;
47-
/// // The `String` is retrieved from the `LazyLock` and returned as `&String`.
48-
/// let _ = &*DEEP_THOUGHT;
4947
/// ```
5048
///
5149
/// Initialize fields with `LazyLock`.

0 commit comments

Comments
 (0)