diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-13 18:25:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-13 18:25:46 +0200 |
| commit | 7d36bfa6c0cfd80ff1b2a29a92abbcaec900710d (patch) | |
| tree | 7383cb7418d92974de7599bf780f270a359a38c8 /compiler/rustc_codegen_llvm/src | |
| parent | b0e323549a50620010afe20496aea2a4975511fb (diff) | |
| parent | f362a59c3ed6241e515e2516a048945a879bbfe3 (diff) | |
| download | rust-7d36bfa6c0cfd80ff1b2a29a92abbcaec900710d.tar.gz rust-7d36bfa6c0cfd80ff1b2a29a92abbcaec900710d.zip | |
Rollup merge of #130301 - RalfJung:clashing_extern_declarations, r=compiler-errors
some fixes for clashing_extern_declarations lint There were two issues with the clashing_extern_declarations lint: - It would accept non-`repr(C)` structs as compatible with each other by comparing their fields in declaration order, but the fields could have different memory order (and with `-Zrandomize-layout`, this can really happen). - It would accept two types as compatible if `compare_layouts` returns `true`, but that function actually just compared the *ABI*, not the fully layout -- and all sized structs with more than 2 fields have the same ABI (`Abi::Aggregate`), so this missed a *lot* of cases. We don't currently have a clear spec for what we *want* to consider "clashing" and what is fine, so I otherwise kept the original logic. I hope to have a t-lang discussion about this at some point. But meanwhile, these changes seem like clear bugfixes.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
