未验证 提交 7f4347f8 编写于 作者: K kennytm 提交者: GitHub

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).
......@@ -276,7 +276,7 @@ unsafe fn init(&self, slot: &UnsafeCell<Option<T>>) -> &T {
///
/// This will lazily initialize the value if this thread has not referenced
/// this key yet. If the key has been destroyed (which may happen if this is called
/// in a destructor), this function will return a `ThreadLocalError`.
/// in a destructor), this function will return an [`AccessError`](struct.AccessError.html).
///
/// # Panics
///
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册