rust/tests
Quinn Sinclair 70024e16c0 New Lint: [thread_local_initializer_can_be_made_const]
Adds a new lint to suggest using `const` on `thread_local!`
initializers that can be evaluated at compile time.

Impl details:

The lint relies on the expansion of `thread_local!`. For non
const-labelled initializers, `thread_local!` produces a function
called `__init` that lazily initializes the value. We check the function
and decide whether the body can be const. The body of the function is
exactly the initializer. If so, we lint the body.

changelog: new lint [`thread_local_initializer_can_be_made_const`]
2024-01-01 18:06:10 +02:00
..
test_utils
ui New Lint: [thread_local_initializer_can_be_made_const] 2024-01-01 18:06:10 +02:00
ui-cargo
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2023-12-28 19:20:18 +01:00
ui-toml add new lint, pub_underscore_fields 2023-12-29 11:44:34 +01:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs
dogfood.rs
headers.rs
integration.rs
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs
workspace.rs