about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/thread/local.rs5
1 files changed, 1 insertions, 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 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
 /// ```
 /// use std::cell::Cell;
 /// thread_local! {
-///     pub static FOO: Cell<u32> = const {
-///         let value = 1;
-///         Cell::new(value)
-///     };
+///     pub static FOO: Cell<u32> = const { Cell::new(1) };
 /// }
 ///
 /// assert_eq!(FOO.get(), 1);