intern offsetof fields
This commit is contained in:
parent
511e457c4b
commit
61f23e0003
8 changed files with 33 additions and 11 deletions
|
@ -1115,7 +1115,7 @@ pub enum Rvalue<'tcx> {
|
|||
CheckedBinaryOp(BinOp, Box<(Operand<'tcx>, Operand<'tcx>)>),
|
||||
|
||||
/// Computes a value as described by the operation.
|
||||
NullaryOp(NullOp, Ty<'tcx>),
|
||||
NullaryOp(NullOp<'tcx>, Ty<'tcx>),
|
||||
|
||||
/// Exactly like `BinaryOp`, but less operands.
|
||||
///
|
||||
|
@ -1212,13 +1212,13 @@ pub enum AggregateKind<'tcx> {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable)]
|
||||
pub enum NullOp {
|
||||
pub enum NullOp<'tcx> {
|
||||
/// Returns the size of a value of that type
|
||||
SizeOf,
|
||||
/// Returns the minimum alignment of a type
|
||||
AlignOf,
|
||||
/// Returns the offset of a field
|
||||
OffsetOf(Vec<FieldIdx>),
|
||||
OffsetOf(&'tcx List<FieldIdx>),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
|
@ -1288,6 +1288,6 @@ mod size_asserts {
|
|||
static_assert_size!(Operand<'_>, 24);
|
||||
static_assert_size!(Place<'_>, 16);
|
||||
static_assert_size!(PlaceElem<'_>, 24);
|
||||
static_assert_size!(Rvalue<'_>, 48);
|
||||
static_assert_size!(Rvalue<'_>, 40);
|
||||
// tidy-alphabetical-end
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue