diff options
| author | Quinn Sinclair <me@partiallytyped.dev> | 2024-01-22 00:16:47 +0100 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2024-03-14 20:25:48 +0100 |
| commit | 1aeacb074bf3893d79e720c557bea4bb99bfeadd (patch) | |
| tree | b09668c3badf6338fe9fc2760478c2f2c5f2ac82 /tests/incremental/thinlto | |
| parent | 339fb6965026c4260d38ab6fd61cfcbecffd8279 (diff) | |
| download | rust-1aeacb074bf3893d79e720c557bea4bb99bfeadd.tar.gz rust-1aeacb074bf3893d79e720c557bea4bb99bfeadd.zip | |
Fixed FP for `thread_local_initializer_can_be_made_const` for `os_local`
`os_local` impl of `thread_local` — regardless of whether it is const and unlike other implementations — includes an `fn __init(): EXPR`. Existing implementation of the lint checked for the presence of said function and whether the expr can be made const. Because for `os_local` we always have an `__init()`, it triggers for const implementations. The solution is to check whether the `__init()` function is already const. If it is `const`, there is nothing to do. Otherwise, we verify that we can make it const. Co-authored-by: Alejandra González <blyxyas@gmail.com>
Diffstat (limited to 'tests/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
