about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-12 10:29:15 +0000
committerbors <bors@rust-lang.org>2024-03-12 10:29:15 +0000
commit3b85d2c7fc6d1698e68b94f7bc1a5c9633f2554d (patch)
treeb76611e92ca15c4b889185b1de1f92120017c64e /library/std/src/sys
parent5b7343b96681c93f6fe752b46d9427f9dee8f94b (diff)
parente2773733f35f71dba92588d6b29e43d2cc035a34 (diff)
downloadrust-3b85d2c7fc6d1698e68b94f7bc1a5c9633f2554d.tar.gz
rust-3b85d2c7fc6d1698e68b94f7bc1a5c9633f2554d.zip
Auto merge of #121644 - oli-obk:unique_static_innards2, r=RalfJung,nnethercote
Ensure nested allocations in statics neither get deduplicated nor duplicated

This PR generates new `DefId`s for nested allocations in static items and feeds all the right queries to make the compiler believe these are regular `static` items. I chose this design, because all other designs are fragile and make the compiler horribly complex for such a niche use case.

At present this wrecks incremental compilation performance *in case nested allocations exist* (because any query creating a `DefId` will be recomputed and never loaded from the cache). This will be resolved later in https://github.com/rust-lang/rust/pull/115613 . All other statics are unaffected by this change and will not have performance regressions (heh, famous last words)

This PR contains various smaller refactorings that can be pulled out into separate PRs. It is best reviewed commit-by-commit. The last commit is where the actual magic happens.

r? `@RalfJung` on the const interner and engine changes

fixes https://github.com/rust-lang/rust/issues/79738
Diffstat (limited to 'library/std/src/sys')
0 files changed, 0 insertions, 0 deletions