Skip to content

Commit

Permalink
std: broaden the allowed behaviour for recursive TLS initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Sep 26, 2023
1 parent 96ab09d commit 559ec69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/std/src/thread/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ use crate::fmt;
/// within a thread, and values that implement [`Drop`] get destructed when a
/// thread exits. Some caveats apply, which are explained below.
///
/// A `LocalKey`'s initializer cannot recursively depend on itself, and using
/// a `LocalKey` in this way will cause the initializer to infinitely recurse
/// on the first call to `with`.
/// A `LocalKey`'s initializer cannot recursively depend on itself. Using a
/// `LocalKey` in this way may cause panics, aborts or infinite recursion on
/// the first call to `with`.
///
/// # Examples
///
Expand Down

0 comments on commit 559ec69

Please sign in to comment.