Revert "Add an unused field of type Option<DefId>
to ParamEnv
struct."
This reverts commit ab83d372ed
.
This commit is contained in:
parent
bb6c249f99
commit
c4d8089f00
3 changed files with 3 additions and 6 deletions
|
@ -57,7 +57,7 @@ pub type TraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>;
|
||||||
|
|
||||||
// `PredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
|
// `PredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
static_assert_size!(PredicateObligation<'_>, 40);
|
static_assert_size!(PredicateObligation<'_>, 32);
|
||||||
|
|
||||||
pub type Obligations<'tcx, O> = Vec<Obligation<'tcx, O>>;
|
pub type Obligations<'tcx, O> = Vec<Obligation<'tcx, O>>;
|
||||||
pub type PredicateObligations<'tcx> = Vec<PredicateObligation<'tcx>>;
|
pub type PredicateObligations<'tcx> = Vec<PredicateObligation<'tcx>>;
|
||||||
|
|
|
@ -1751,9 +1751,6 @@ pub struct ParamEnv<'tcx> {
|
||||||
///
|
///
|
||||||
/// Note: This is packed, use the reveal() method to access it.
|
/// Note: This is packed, use the reveal() method to access it.
|
||||||
packed: CopyTaggedPtr<&'tcx List<Predicate<'tcx>>, traits::Reveal, true>,
|
packed: CopyTaggedPtr<&'tcx List<Predicate<'tcx>>, traits::Reveal, true>,
|
||||||
|
|
||||||
/// FIXME: This field is not used, but removing it causes a performance degradation. See #76913.
|
|
||||||
unused_field: Option<DefId>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl rustc_data_structures::tagged_ptr::Tag for traits::Reveal {
|
unsafe impl rustc_data_structures::tagged_ptr::Tag for traits::Reveal {
|
||||||
|
@ -1834,7 +1831,7 @@ impl<'tcx> ParamEnv<'tcx> {
|
||||||
/// Construct a trait environment with the given set of predicates.
|
/// Construct a trait environment with the given set of predicates.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(caller_bounds: &'tcx List<Predicate<'tcx>>, reveal: Reveal) -> Self {
|
pub fn new(caller_bounds: &'tcx List<Predicate<'tcx>>, reveal: Reveal) -> Self {
|
||||||
ty::ParamEnv { packed: CopyTaggedPtr::new(caller_bounds, reveal), unused_field: None }
|
ty::ParamEnv { packed: CopyTaggedPtr::new(caller_bounds, reveal) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_user_facing(mut self) -> Self {
|
pub fn with_user_facing(mut self) -> Self {
|
||||||
|
|
|
@ -87,7 +87,7 @@ pub struct PendingPredicateObligation<'tcx> {
|
||||||
|
|
||||||
// `PendingPredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
|
// `PendingPredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
static_assert_size!(PendingPredicateObligation<'_>, 64);
|
static_assert_size!(PendingPredicateObligation<'_>, 56);
|
||||||
|
|
||||||
impl<'a, 'tcx> FulfillmentContext<'tcx> {
|
impl<'a, 'tcx> FulfillmentContext<'tcx> {
|
||||||
/// Creates a new fulfillment context.
|
/// Creates a new fulfillment context.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue