diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs index 4c5e0e913945..2e13f433dcff 100644 --- a/library/std/src/thread/local.rs +++ b/library/std/src/thread/local.rs @@ -166,10 +166,7 @@ impl fmt::Debug for LocalKey { /// ``` /// 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);