Skip to content

Commit 9738caa

Browse files
authored
Merge pull request #180 from andersk/thread-const
Fix clippy::thread_local_initializer_can_be_made_const
2 parents bf28b34 + 124f89e commit 9738caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gc/src/gc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl Drop for GcState {
2626

2727
// Whether or not the thread is currently in the sweep phase of garbage collection.
2828
// During this phase, attempts to dereference a `Gc<T>` pointer will trigger a panic.
29-
thread_local!(pub static GC_DROPPING: Cell<bool> = Cell::new(false));
29+
thread_local!(pub static GC_DROPPING: Cell<bool> = const { Cell::new(false) });
3030
struct DropGuard;
3131
impl DropGuard {
3232
fn new() -> DropGuard {

0 commit comments

Comments
 (0)