Auto merge of #88839 - nbdd0121:alignof, r=nagisa
Introduce NullOp::AlignOf This PR introduces `Rvalue::NullaryOp(NullOp::AlignOf, ty)`, which will be lowered from `align_of`, similar to `size_of` lowering to `Rvalue::NullaryOp(NullOp::SizeOf, ty)`. The changes are originally part of #88700 but since it's not dependent on other changes and could have performance impact on its own, it's separated into its own PR.
This commit is contained in:
commit
96dee2825e
21 changed files with 234 additions and 184 deletions
|
@ -2277,6 +2277,8 @@ impl BinOp {
|
|||
pub enum NullOp {
|
||||
/// Returns the size of a value of that type
|
||||
SizeOf,
|
||||
/// Returns the minimum alignment of a type
|
||||
AlignOf,
|
||||
/// Creates a new uninitialized box for a value of that type
|
||||
Box,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue