diff options
| author | Quinn Sinclair <me@partiallytyped.dev> | 2024-01-22 00:16:47 +0100 |
|---|---|---|
| committer | Quinn Sinclair <me@partiallytyped.dev> | 2024-03-01 00:41:14 +0100 |
| commit | bb1ee8746ee0734fac664e78b59be589459c2026 (patch) | |
| tree | 98e430c68ee92421221abfb894814f584f9518f3 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 3b8da4ac4b63ea37490fb26226e7eaa83a160733 (diff) | |
| download | rust-bb1ee8746ee0734fac664e78b59be589459c2026.tar.gz rust-bb1ee8746ee0734fac664e78b59be589459c2026.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 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
