Rollup merge of #137194 - kornelski:ftls, r=tgross35

More const {} init in thread_local

`const {}` in `thread_local!` gets an optimization just based on the syntax, rather than the expression being const-compatible. This is easy to miss, so I've added more examples to the docs.

I've also added `const {}` in a couple of places in std where this optimization has been missed.
This commit is contained in:
Jacob Pratt 2025-02-23 02:44:17 -05:00 committed by GitHub
commit ea923f9bd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

Diff Content Not Available