Check the sizes of Operand, Rvalue, AggregateKind and Place
This commit is contained in:
parent
939b14334d
commit
f31481368b
1 changed files with 12 additions and 0 deletions
|
@ -1657,6 +1657,9 @@ pub struct Place<'tcx> {
|
||||||
pub projection: &'tcx List<PlaceElem<'tcx>>,
|
pub projection: &'tcx List<PlaceElem<'tcx>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
static_assert_size!(Place<'_>, 16);
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[derive(TyEncodable, TyDecodable, HashStable)]
|
#[derive(TyEncodable, TyDecodable, HashStable)]
|
||||||
pub enum ProjectionElem<V, T> {
|
pub enum ProjectionElem<V, T> {
|
||||||
|
@ -1955,6 +1958,9 @@ pub enum Operand<'tcx> {
|
||||||
Constant(Box<Constant<'tcx>>),
|
Constant(Box<Constant<'tcx>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
static_assert_size!(Operand<'_>, 24);
|
||||||
|
|
||||||
impl<'tcx> Debug for Operand<'tcx> {
|
impl<'tcx> Debug for Operand<'tcx> {
|
||||||
fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
|
||||||
use self::Operand::*;
|
use self::Operand::*;
|
||||||
|
@ -2090,6 +2096,9 @@ pub enum Rvalue<'tcx> {
|
||||||
Aggregate(Box<AggregateKind<'tcx>>, Vec<Operand<'tcx>>),
|
Aggregate(Box<AggregateKind<'tcx>>, Vec<Operand<'tcx>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
static_assert_size!(Rvalue<'_>, 56);
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable)]
|
||||||
pub enum CastKind {
|
pub enum CastKind {
|
||||||
Misc,
|
Misc,
|
||||||
|
@ -2113,6 +2122,9 @@ pub enum AggregateKind<'tcx> {
|
||||||
Generator(DefId, SubstsRef<'tcx>, hir::Movability),
|
Generator(DefId, SubstsRef<'tcx>, hir::Movability),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
static_assert_size!(AggregateKind<'_>, 48);
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, TyEncodable, TyDecodable, Hash, HashStable)]
|
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, TyEncodable, TyDecodable, Hash, HashStable)]
|
||||||
pub enum BinOp {
|
pub enum BinOp {
|
||||||
/// The `+` operator (addition)
|
/// The `+` operator (addition)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue