Commit 8dabf5d
committed
Auto merge of rust-lang#107167 - the8472:rawvec-simpler-layout, r=thomcc
simplify layout calculations in rawvec
The use of `Layout::array` was introduced in rust-lang#83706 which lead to a [perf regression](rust-lang#83706 (comment)).
This PR basically reverts that change since rust currently only supports stride == size types, but to be on the safe side it leaves a const-assert there to make sure this gets caught if those assumptions ever change.File tree
2 files changed
+13
-6
lines changed- library/alloc/src
- tests/ui/hygiene
2 files changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
246 | 249 | | |
247 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
248 | 253 | | |
249 | 254 | | |
250 | 255 | | |
| |||
426 | 431 | | |
427 | 432 | | |
428 | 433 | | |
429 | | - | |
| 434 | + | |
| 435 | + | |
430 | 436 | | |
431 | 437 | | |
432 | 438 | | |
433 | | - | |
| 439 | + | |
| 440 | + | |
434 | 441 | | |
435 | 442 | | |
436 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
0 commit comments