We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc75a4e commit f52b88eCopy full SHA for f52b88e
library/std/src/thread/local.rs
@@ -166,10 +166,7 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
166
/// ```
167
/// use std::cell::Cell;
168
/// thread_local! {
169
-/// pub static FOO: Cell<u32> = const {
170
-/// let value = 1;
171
-/// Cell::new(value)
172
-/// };
+/// pub static FOO: Cell<u32> = const { Cell::new(1) };
173
/// }
174
///
175
/// assert_eq!(FOO.get(), 1);
0 commit comments