Skip to content

Commit

Permalink
Merge pull request #180 from andersk/thread-const
Browse files Browse the repository at this point in the history
Fix clippy::thread_local_initializer_can_be_made_const
  • Loading branch information
Manishearth authored Jul 17, 2024
2 parents bf28b34 + 124f89e commit 9738caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gc/src/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Drop for GcState {

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

0 comments on commit 9738caa

Please sign in to comment.