Avoid repeating qualifiers on static_assert_size
calls.
Some of these don't need a `use` statement because there is already a `#[macro_use] extern crate rustc_data_structures` item in the crate.
This commit is contained in:
parent
f03ce30962
commit
574ba831d4
@ -3030,22 +3030,23 @@ pub type ForeignItem = Item<ForeignItemKind>;
|
||||
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
use rustc_data_structures::static_assert_size;
|
||||
// These are in alphabetical order, which is easy to maintain.
|
||||
rustc_data_structures::static_assert_size!(AssocItemKind, 72);
|
||||
rustc_data_structures::static_assert_size!(Attribute, 152);
|
||||
rustc_data_structures::static_assert_size!(Block, 48);
|
||||
rustc_data_structures::static_assert_size!(Expr, 104);
|
||||
rustc_data_structures::static_assert_size!(Fn, 192);
|
||||
rustc_data_structures::static_assert_size!(ForeignItemKind, 72);
|
||||
rustc_data_structures::static_assert_size!(GenericBound, 88);
|
||||
rustc_data_structures::static_assert_size!(Generics, 72);
|
||||
rustc_data_structures::static_assert_size!(Impl, 200);
|
||||
rustc_data_structures::static_assert_size!(Item, 200);
|
||||
rustc_data_structures::static_assert_size!(ItemKind, 112);
|
||||
rustc_data_structures::static_assert_size!(Lit, 48);
|
||||
rustc_data_structures::static_assert_size!(Pat, 120);
|
||||
rustc_data_structures::static_assert_size!(Path, 40);
|
||||
rustc_data_structures::static_assert_size!(PathSegment, 24);
|
||||
rustc_data_structures::static_assert_size!(Stmt, 32);
|
||||
rustc_data_structures::static_assert_size!(Ty, 96);
|
||||
static_assert_size!(AssocItemKind, 72);
|
||||
static_assert_size!(Attribute, 152);
|
||||
static_assert_size!(Block, 48);
|
||||
static_assert_size!(Expr, 104);
|
||||
static_assert_size!(Fn, 192);
|
||||
static_assert_size!(ForeignItemKind, 72);
|
||||
static_assert_size!(GenericBound, 88);
|
||||
static_assert_size!(Generics, 72);
|
||||
static_assert_size!(Impl, 200);
|
||||
static_assert_size!(Item, 200);
|
||||
static_assert_size!(ItemKind, 112);
|
||||
static_assert_size!(Lit, 48);
|
||||
static_assert_size!(Pat, 120);
|
||||
static_assert_size!(Path, 40);
|
||||
static_assert_size!(PathSegment, 24);
|
||||
static_assert_size!(Stmt, 32);
|
||||
static_assert_size!(Ty, 96);
|
||||
}
|
||||
|
@ -823,9 +823,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
use rustc_data_structures::static_assert_size;
|
||||
// These are in alphabetical order, which is easy to maintain.
|
||||
rustc_data_structures::static_assert_size!(Immediate, 56);
|
||||
rustc_data_structures::static_assert_size!(ImmTy<'_>, 72);
|
||||
rustc_data_structures::static_assert_size!(Operand, 64);
|
||||
rustc_data_structures::static_assert_size!(OpTy<'_>, 88);
|
||||
static_assert_size!(Immediate, 56);
|
||||
static_assert_size!(ImmTy<'_>, 72);
|
||||
static_assert_size!(Operand, 64);
|
||||
static_assert_size!(OpTy<'_>, 88);
|
||||
}
|
||||
|
@ -891,10 +891,11 @@ where
|
||||
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
use rustc_data_structures::static_assert_size;
|
||||
// These are in alphabetical order, which is easy to maintain.
|
||||
rustc_data_structures::static_assert_size!(MemPlaceMeta, 24);
|
||||
rustc_data_structures::static_assert_size!(MemPlace, 40);
|
||||
rustc_data_structures::static_assert_size!(MPlaceTy<'_>, 64);
|
||||
rustc_data_structures::static_assert_size!(Place, 48);
|
||||
rustc_data_structures::static_assert_size!(PlaceTy<'_>, 72);
|
||||
static_assert_size!(MemPlaceMeta, 24);
|
||||
static_assert_size!(MemPlace, 40);
|
||||
static_assert_size!(MPlaceTy<'_>, 64);
|
||||
static_assert_size!(Place, 48);
|
||||
static_assert_size!(PlaceTy<'_>, 72);
|
||||
}
|
||||
|
@ -3491,16 +3491,16 @@ impl<'hir> Node<'hir> {
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
// These are in alphabetical order, which is easy to maintain.
|
||||
rustc_data_structures::static_assert_size!(Block<'static>, 48);
|
||||
rustc_data_structures::static_assert_size!(Expr<'static>, 56);
|
||||
rustc_data_structures::static_assert_size!(ForeignItem<'static>, 72);
|
||||
rustc_data_structures::static_assert_size!(GenericBound<'_>, 48);
|
||||
rustc_data_structures::static_assert_size!(Generics<'static>, 56);
|
||||
rustc_data_structures::static_assert_size!(ImplItem<'static>, 88);
|
||||
rustc_data_structures::static_assert_size!(Impl<'static>, 80);
|
||||
rustc_data_structures::static_assert_size!(Item<'static>, 80);
|
||||
rustc_data_structures::static_assert_size!(Pat<'static>, 88);
|
||||
rustc_data_structures::static_assert_size!(QPath<'static>, 24);
|
||||
rustc_data_structures::static_assert_size!(TraitItem<'static>, 96);
|
||||
rustc_data_structures::static_assert_size!(Ty<'static>, 72);
|
||||
static_assert_size!(Block<'static>, 48);
|
||||
static_assert_size!(Expr<'static>, 56);
|
||||
static_assert_size!(ForeignItem<'static>, 72);
|
||||
static_assert_size!(GenericBound<'_>, 48);
|
||||
static_assert_size!(Generics<'static>, 56);
|
||||
static_assert_size!(ImplItem<'static>, 88);
|
||||
static_assert_size!(Impl<'static>, 80);
|
||||
static_assert_size!(Item<'static>, 80);
|
||||
static_assert_size!(Pat<'static>, 88);
|
||||
static_assert_size!(QPath<'static>, 24);
|
||||
static_assert_size!(TraitItem<'static>, 96);
|
||||
static_assert_size!(Ty<'static>, 72);
|
||||
}
|
||||
|
@ -814,8 +814,8 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
// These are in alphabetical order, which is easy to maintain.
|
||||
rustc_data_structures::static_assert_size!(Block, 56);
|
||||
rustc_data_structures::static_assert_size!(Expr<'_>, 104);
|
||||
rustc_data_structures::static_assert_size!(Pat<'_>, 24);
|
||||
rustc_data_structures::static_assert_size!(Stmt<'_>, 120);
|
||||
static_assert_size!(Block, 56);
|
||||
static_assert_size!(Expr<'_>, 104);
|
||||
static_assert_size!(Pat<'_>, 24);
|
||||
static_assert_size!(Stmt<'_>, 120);
|
||||
}
|
||||
|
@ -2495,14 +2495,15 @@ impl SubstParam {
|
||||
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
use rustc_data_structures::static_assert_size;
|
||||
// These are in alphabetical order, which is easy to maintain.
|
||||
rustc_data_structures::static_assert_size!(Crate, 72); // frequently moved by-value
|
||||
rustc_data_structures::static_assert_size!(DocFragment, 32);
|
||||
rustc_data_structures::static_assert_size!(GenericArg, 80);
|
||||
rustc_data_structures::static_assert_size!(GenericArgs, 32);
|
||||
rustc_data_structures::static_assert_size!(GenericParamDef, 56);
|
||||
rustc_data_structures::static_assert_size!(Item, 56);
|
||||
rustc_data_structures::static_assert_size!(ItemKind, 112);
|
||||
rustc_data_structures::static_assert_size!(PathSegment, 40);
|
||||
rustc_data_structures::static_assert_size!(Type, 72);
|
||||
static_assert_size!(Crate, 72); // frequently moved by-value
|
||||
static_assert_size!(DocFragment, 32);
|
||||
static_assert_size!(GenericArg, 80);
|
||||
static_assert_size!(GenericArgs, 32);
|
||||
static_assert_size!(GenericParamDef, 56);
|
||||
static_assert_size!(Item, 56);
|
||||
static_assert_size!(ItemKind, 112);
|
||||
static_assert_size!(PathSegment, 40);
|
||||
static_assert_size!(Type, 72);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user