From f52b88e91f2d185a8be2bf4243827f7b720cd513 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 20 Jan 2024 18:39:48 -0800 Subject: [PATCH] Revert example change from PR 116392 --- library/std/src/thread/local.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index 4c5e0e91394..2e13f433dcf 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -166,10 +166,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { /// ``` /// use std::cell::Cell; /// thread_local! { -/// pub static FOO: Cell = const { -/// let value = 1; -/// Cell::new(value) -/// }; +/// pub static FOO: Cell = const { Cell::new(1) }; /// } /// /// assert_eq!(FOO.get(), 1);