Skip to content

Commit 7f4347f

Browse files
authored
Rollup merge of #51824 - vorner:thread-local-try-with-doc, r=kennytm
Fix the error reference for LocalKey::try_with There's no such thing as `ThreadLocalError` and the method obviously returns `AccessError`, so adjusting (probably only outdated docs).
2 parents 700a2f7 + 771748d commit 7f4347f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/thread/local.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<T: 'static> LocalKey<T> {
276276
///
277277
/// This will lazily initialize the value if this thread has not referenced
278278
/// this key yet. If the key has been destroyed (which may happen if this is called
279-
/// in a destructor), this function will return a `ThreadLocalError`.
279+
/// in a destructor), this function will return an [`AccessError`](struct.AccessError.html).
280280
///
281281
/// # Panics
282282
///

0 commit comments

Comments
 (0)