about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-07-29 23:50:35 +1000
committerGitHub <noreply@github.com>2025-07-29 23:50:35 +1000
commit826c462c32642c8cc17d708a1bb9a7022fd5bdd5 (patch)
tree11a4ba4c50e698b28abd6fb0e1a7df77d121d925 /compiler/rustc_pattern_analysis/src
parentf8370285cf81e8af24c7f95b77cbb83c3d6db1cf (diff)
parent8ef9233339c09d80e12b31c523082b94d9e09b44 (diff)
downloadrust-826c462c32642c8cc17d708a1bb9a7022fd5bdd5.tar.gz
rust-826c462c32642c8cc17d708a1bb9a7022fd5bdd5.zip
Rollup merge of #144566 - scottmcm:align-of-slice, r=oli-obk
Simplify `align_of_val::<[T]>(…)` → `align_of::<T>()`

I spotted this while working on the inliner (rust-lang/rust#144561).  In particular, if [`Layout::for_value`](https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.for_value) inlines, then it can be pretty easy to end up with an `align_of_val::<[T]>` today (demo: <https://rust.godbolt.org/z/Tesnscj4a>) where we can save at least a block, if not more, by using the version that's an rvalue and not a call.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions