mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
std: broaden the allowed behaviour for recursive TLS initialization
This commit is contained in:
parent
96ab09dbdd
commit
559ec69e41
@ -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
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user