about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/layout/invariant.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-02-23 02:44:17 -0500
committerGitHub <noreply@github.com>2025-02-23 02:44:17 -0500
commit2ff53a293e6dde5344a1f02c41dc9043816b8271 (patch)
tree70dbc6612065a2bd2abec0e4555fc9b40dffcd81 /compiler/rustc_ty_utils/src/layout/invariant.rs
parent4493159b350f0d61c0eee4ef92fde6e91610ba57 (diff)
parent4742dbc765165dc0ece5e350b3527e697ff871dc (diff)
downloadrust-2ff53a293e6dde5344a1f02c41dc9043816b8271.tar.gz
rust-2ff53a293e6dde5344a1f02c41dc9043816b8271.zip
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.
Diffstat (limited to 'compiler/rustc_ty_utils/src/layout/invariant.rs')
0 files changed, 0 insertions, 0 deletions