Remove extern crate rustc_data_structures
from numerous crates.
This commit is contained in:
parent
f3e05d1609
commit
7418aa1a07
@ -3863,6 +3863,7 @@ impl<'hir> Node<'hir> {
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
use rustc_data_structures::static_assert_size;
|
||||
// tidy-alphabetical-start
|
||||
static_assert_size!(Block<'_>, 48);
|
||||
static_assert_size!(Body<'_>, 24);
|
||||
|
@ -56,7 +56,7 @@ macro_rules! language_item_table {
|
||||
$( $(#[$attr:meta])* $variant:ident, $module:ident :: $name:ident, $method:ident, $target:expr, $generics:expr; )*
|
||||
) => {
|
||||
|
||||
enum_from_u32! {
|
||||
rustc_data_structures::enum_from_u32! {
|
||||
/// A representation of all the valid lang items in Rust.
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable)]
|
||||
pub enum LangItem {
|
||||
|
@ -13,9 +13,6 @@
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_data_structures;
|
||||
|
||||
extern crate self as rustc_hir;
|
||||
|
||||
mod arena;
|
||||
|
@ -479,7 +479,7 @@ pub enum SubregionOrigin<'tcx> {
|
||||
|
||||
// `SubregionOrigin` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(SubregionOrigin<'_>, 32);
|
||||
rustc_data_structures::static_assert_size!(SubregionOrigin<'_>, 32);
|
||||
|
||||
impl<'tcx> SubregionOrigin<'tcx> {
|
||||
pub fn to_constraint_category(&self) -> ConstraintCategory<'tcx> {
|
||||
|
@ -30,9 +30,6 @@
|
||||
#![feature(yeet_expr)]
|
||||
#![recursion_limit = "512"] // For rustdoc
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[macro_use]
|
||||
extern crate rustc_data_structures;
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
#[macro_use]
|
||||
|
@ -113,7 +113,7 @@ impl<'tcx> PolyTraitObligation<'tcx> {
|
||||
|
||||
// `PredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(PredicateObligation<'_>, 48);
|
||||
rustc_data_structures::static_assert_size!(PredicateObligation<'_>, 48);
|
||||
|
||||
pub type PredicateObligations<'tcx> = Vec<PredicateObligation<'tcx>>;
|
||||
|
||||
|
@ -68,8 +68,6 @@
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate rustc_data_structures;
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
#[macro_use]
|
||||
extern crate smallvec;
|
||||
|
@ -153,7 +153,7 @@ rustc_index::newtype_index! {
|
||||
}
|
||||
|
||||
// compilation error if size of `ScopeData` is not the same as a `u32`
|
||||
static_assert_size!(ScopeData, 4);
|
||||
rustc_data_structures::static_assert_size!(ScopeData, 4);
|
||||
|
||||
impl Scope {
|
||||
/// Returns an item-local ID associated with this scope.
|
||||
|
@ -72,7 +72,7 @@ pub enum ConstValue<'tcx> {
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(ConstValue<'_>, 24);
|
||||
rustc_data_structures::static_assert_size!(ConstValue<'_>, 24);
|
||||
|
||||
impl<'tcx> ConstValue<'tcx> {
|
||||
#[inline]
|
||||
|
@ -89,7 +89,7 @@ pub type EvalToConstValueResult<'tcx> = Result<ConstValue<'tcx>, ErrorHandled>;
|
||||
pub type EvalToValTreeResult<'tcx> = Result<Option<ValTree<'tcx>>, ErrorHandled>;
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(InterpErrorInfo<'_>, 8);
|
||||
rustc_data_structures::static_assert_size!(InterpErrorInfo<'_>, 8);
|
||||
|
||||
/// Packages the kind of error we got from the const code interpreter
|
||||
/// up with a Rust-level backtrace of where the error occurred.
|
||||
|
@ -1,5 +1,6 @@
|
||||
use super::{AllocId, InterpResult};
|
||||
|
||||
use rustc_data_structures::static_assert_size;
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
|
||||
use rustc_target::abi::{HasDataLayout, Size};
|
||||
|
||||
|
@ -38,7 +38,7 @@ pub enum Scalar<Prov = CtfeProvenance> {
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(Scalar, 24);
|
||||
rustc_data_structures::static_assert_size!(Scalar, 24);
|
||||
|
||||
// We want the `Debug` output to be readable as it is used by `derive(Debug)` for
|
||||
// all the Miri types.
|
||||
|
@ -1523,6 +1523,7 @@ pub enum BinOp {
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
use rustc_data_structures::static_assert_size;
|
||||
// tidy-alphabetical-start
|
||||
static_assert_size!(AggregateKind<'_>, 32);
|
||||
static_assert_size!(Operand<'_>, 24);
|
||||
|
@ -15,7 +15,7 @@ pub struct PlaceTy<'tcx> {
|
||||
|
||||
// At least on 64 bit systems, `PlaceTy` should not be larger than two or three pointers.
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(PlaceTy<'_>, 16);
|
||||
rustc_data_structures::static_assert_size!(PlaceTy<'_>, 16);
|
||||
|
||||
impl<'tcx> PlaceTy<'tcx> {
|
||||
#[inline]
|
||||
|
@ -1,5 +1,3 @@
|
||||
use super::*;
|
||||
|
||||
// FIXME(#27438): right now the unit tests of rustc_middle don't refer to any actual
|
||||
// functions generated in rustc_data_structures (all
|
||||
// references are through generic functions), but statics are
|
||||
|
@ -1210,6 +1210,7 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
mod size_asserts {
|
||||
use super::*;
|
||||
use rustc_data_structures::static_assert_size;
|
||||
// tidy-alphabetical-start
|
||||
static_assert_size!(Block, 48);
|
||||
static_assert_size!(Expr<'_>, 64);
|
||||
|
@ -560,7 +560,7 @@ impl<'tcx> ObligationCauseCode<'tcx> {
|
||||
|
||||
// `ObligationCauseCode` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(ObligationCauseCode<'_>, 48);
|
||||
rustc_data_structures::static_assert_size!(ObligationCauseCode<'_>, 48);
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum StatementAsExpression {
|
||||
|
@ -23,7 +23,7 @@ pub use valtree::*;
|
||||
pub type ConstKind<'tcx> = IrConstKind<TyCtxt<'tcx>>;
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(ConstKind<'_>, 32);
|
||||
rustc_data_structures::static_assert_size!(ConstKind<'_>, 32);
|
||||
|
||||
/// Use this rather than `ConstData`, whenever possible.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, HashStable)]
|
||||
@ -63,7 +63,7 @@ pub struct ConstData<'tcx> {
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(ConstData<'_>, 40);
|
||||
rustc_data_structures::static_assert_size!(ConstData<'_>, 40);
|
||||
|
||||
impl<'tcx> Const<'tcx> {
|
||||
#[inline]
|
||||
|
@ -72,4 +72,4 @@ pub enum Expr<'tcx> {
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(Expr<'_>, 24);
|
||||
rustc_data_structures::static_assert_size!(Expr<'_>, 24);
|
||||
|
@ -1085,7 +1085,7 @@ struct ParamTag {
|
||||
reveal: traits::Reveal,
|
||||
}
|
||||
|
||||
impl_tag! {
|
||||
rustc_data_structures::impl_tag! {
|
||||
impl Tag for ParamTag;
|
||||
ParamTag { reveal: traits::Reveal::UserFacing },
|
||||
ParamTag { reveal: traits::Reveal::All },
|
||||
|
@ -29,9 +29,6 @@
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![recursion_limit = "512"] // For rustdoc
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[macro_use]
|
||||
extern crate rustc_data_structures;
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
#[macro_use]
|
||||
|
@ -73,7 +73,7 @@ pub struct PendingPredicateObligation<'tcx> {
|
||||
|
||||
// `PendingPredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
static_assert_size!(PendingPredicateObligation<'_>, 72);
|
||||
rustc_data_structures::static_assert_size!(PendingPredicateObligation<'_>, 72);
|
||||
|
||||
impl<'tcx> FulfillmentContext<'tcx> {
|
||||
/// Creates a new fulfillment context.
|
||||
|
Loading…
x
Reference in New Issue
Block a user