Skip to content

core: fix missed register_callsite error #5125

core: fix missed register_callsite error

core: fix missed register_callsite error #5125

GitHub Actions / clippy failed Apr 16, 2024 in 1s

clippy

2 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 2
Warning 0
Note 0
Help 0

Versions

  • rustc 1.77.2 (25ef9e3d8 2024-04-09)
  • cargo 1.77.2 (e52e36006 2024-03-26)
  • clippy 0.1.77 (25ef9e3 2024-04-09)

Annotations

Check failure on line 946 in tracing-subscriber/src/fmt/fmt_layer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

initializer for `thread_local` value can be made `const`

error: initializer for `thread_local` value can be made `const`
   --> tracing-subscriber/src/fmt/fmt_layer.rs:946:43
    |
946 |             static BUF: RefCell<String> = RefCell::new(String::new());
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const

Check failure on line 217 in tracing-subscriber/src/registry/sharded.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

initializer for `thread_local` value can be made `const`

error: initializer for `thread_local` value can be made `const`
   --> tracing-subscriber/src/registry/sharded.rs:217:39
    |
217 |     static CLOSE_COUNT: Cell<usize> = Cell::new(0);
    |                                       ^^^^^^^^^^^^ help: replace with: `const { Cell::new(0) }`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
    = note: `-D clippy::thread-local-initializer-can-be-made-const` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::thread_local_initializer_can_be_made_const)]`