diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-09-30 20:46:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-30 20:46:45 +0200 |
| commit | f7c7e34ae4b98edba4049326005c902fb7b6d0ab (patch) | |
| tree | 91039fa2c84d907f96b8295bed7f6a89b82706ba /compiler/rustc_codegen_llvm/src | |
| parent | 61b9467af89c18fb2b1e08da1fce2472b2147cc1 (diff) | |
| parent | 9e79fac0354b2a87515c30e94754413ef99b3675 (diff) | |
| download | rust-f7c7e34ae4b98edba4049326005c902fb7b6d0ab.tar.gz rust-f7c7e34ae4b98edba4049326005c902fb7b6d0ab.zip | |
Rollup merge of #146886 - taiki-e:rc-inner-align, r=Mark-Simulacrum
Add repr(align(2)) to RcInner and ArcInner `Rc` currently assumes that `RcInner` has at least 2-byte alignment, but on AVR, `usize` has 1-byte alignment (this is because the AVR has 1-byte register sizes, so having 2-byte alignment is generally useless), breaking this assumption. https://github.com/rust-lang/rust/blob/9f32ccf35fb877270bc44a86a126440f04d676d0/library/alloc/src/rc.rs#L3005-L3008 This PR adds `repr(align(2))` to force `RcInner` to always have at least 2-byte alignment. Note that `ArcInner` doesn't need `repr(align(2))` because atomic types have the alignment same as its size. This PR adds a comment about this.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
