Assert the size of the refactored enums
This commit is contained in:
@@ -2663,6 +2663,7 @@ pub struct TraitKind(
|
|||||||
pub GenericBounds,
|
pub GenericBounds,
|
||||||
pub Vec<P<AssocItem>>,
|
pub Vec<P<AssocItem>>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[derive(Clone, Encodable, Decodable, Debug)]
|
#[derive(Clone, Encodable, Decodable, Debug)]
|
||||||
pub struct TyAliasKind(pub Defaultness, pub Generics, pub GenericBounds, pub Option<P<Ty>>);
|
pub struct TyAliasKind(pub Defaultness, pub Generics, pub GenericBounds, pub Option<P<Ty>>);
|
||||||
|
|
||||||
@@ -2753,6 +2754,9 @@ pub enum ItemKind {
|
|||||||
MacroDef(MacroDef),
|
MacroDef(MacroDef),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
rustc_data_structures::static_assert_size!(ItemKind, 112);
|
||||||
|
|
||||||
impl ItemKind {
|
impl ItemKind {
|
||||||
pub fn article(&self) -> &str {
|
pub fn article(&self) -> &str {
|
||||||
use ItemKind::*;
|
use ItemKind::*;
|
||||||
@@ -2824,6 +2828,9 @@ pub enum AssocItemKind {
|
|||||||
MacCall(MacCall),
|
MacCall(MacCall),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
rustc_data_structures::static_assert_size!(AssocItemKind, 72);
|
||||||
|
|
||||||
impl AssocItemKind {
|
impl AssocItemKind {
|
||||||
pub fn defaultness(&self) -> Defaultness {
|
pub fn defaultness(&self) -> Defaultness {
|
||||||
match *self {
|
match *self {
|
||||||
@@ -2873,6 +2880,9 @@ pub enum ForeignItemKind {
|
|||||||
MacCall(MacCall),
|
MacCall(MacCall),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
rustc_data_structures::static_assert_size!(ForeignItemKind, 72);
|
||||||
|
|
||||||
impl From<ForeignItemKind> for ItemKind {
|
impl From<ForeignItemKind> for ItemKind {
|
||||||
fn from(foreign_item_kind: ForeignItemKind) -> ItemKind {
|
fn from(foreign_item_kind: ForeignItemKind) -> ItemKind {
|
||||||
match foreign_item_kind {
|
match foreign_item_kind {
|
||||||
|
|||||||
Reference in New Issue
Block a user