Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#123310 - compiler-errors:nested-static-codege…
…n-attrs, r=oli-obk Don't inherit codegen attrs from parent static Putting this up partly for discussion and partly for review. Specifically, in rust-lang#121644, `@oli-obk` designed a system that creates new static items for representing nested allocations in statics. However, in that PR, oli made it so that these statics inherited the codegen attrs from the parent. This causes problems such as colliding symbols with `#[export_name]` and ICEs with `#[no_mangle]` since these synthetic statics have no `tcx.item_name(..)`. So the question is, is there any case where we *do* want to inherit codegen attrs from the parent? The only one that seems a bit suspicious is the thread-local attribute. And there may be some interesting interactions with the coverage attributes as well... Fixes (after backport) rust-lang#123274. Fixes rust-lang#123243. cc rust-lang#121644. r? `@oli-obk` cc `@nnethercote` `@RalfJung` (reviewers on that pr)
- Loading branch information