diff options
| author | David Tolnay <dtolnay@gmail.com> | 2024-01-20 18:39:48 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2024-01-20 18:39:48 -0800 |
| commit | f52b88e91f2d185a8be2bf4243827f7b720cd513 (patch) | |
| tree | c4cf232a6de76cfd8e89c2f072bada55846c155d | |
| parent | fc75a4e14607a9b6445fd0c6685fb6999fa69de8 (diff) | |
| download | rust-f52b88e91f2d185a8be2bf4243827f7b720cd513.tar.gz rust-f52b88e91f2d185a8be2bf4243827f7b720cd513.zip | |
Revert example change from PR 116392
| -rw-r--r-- | library/std/src/thread/local.rs | 5 |
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); |
