diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-04-09 13:39:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-09 13:39:21 +0200 |
| commit | 1c5db28ec3b4ad20156a210046f19583db3d1cae (patch) | |
| tree | fd18cda666cb142edabb0614de3b86e81e838a6a /compiler/rustc_interface/src/interface.rs | |
| parent | bb78dba64ca4158ef2f3488d0d41a82c75a504f2 (diff) | |
| parent | f539134e2098bcc02d5c6228034974c67196adab (diff) | |
| download | rust-1c5db28ec3b4ad20156a210046f19583db3d1cae.tar.gz rust-1c5db28ec3b4ad20156a210046f19583db3d1cae.zip | |
Rollup merge of #123254 - stepancheg:thin-box-0-const-alloc, r=oli-obk
Do not allocate for ZST ThinBox (attempt 2 using const_allocate) There's PR https://github.com/rust-lang/rust/pull/123184 which avoids allocation for ZST ThinBox. That PR has an issue with unsoundness with padding in `MaybeUninit` (see comments in that PR). Also that PR relies on `Freeze` trait. This PR is much simpler implementation which does not have this problem, but it uses `const_allocate` feature. `@oli-obk` suggested that `const_allocate` should not be used for that feature. But I like how easy it to do this feature with `const_allocate`. Maybe it's OK to use `const_allocate` while `ThinBox` is unstable? Or, well, we can abandon this PR. r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
0 files changed, 0 insertions, 0 deletions
