Add an unused field of type Option<DefId> to ParamEnv struct.
This commit is contained in:
@@ -1745,6 +1745,9 @@ pub struct ParamEnv<'tcx> {
|
||||
///
|
||||
/// Note: This is packed, use the reveal() method to access it.
|
||||
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 {
|
||||
@@ -1825,7 +1828,7 @@ impl<'tcx> ParamEnv<'tcx> {
|
||||
/// Construct a trait environment with the given set of predicates.
|
||||
#[inline]
|
||||
pub fn new(caller_bounds: &'tcx List<Predicate<'tcx>>, reveal: Reveal) -> Self {
|
||||
ty::ParamEnv { packed: CopyTaggedPtr::new(caller_bounds, reveal) }
|
||||
ty::ParamEnv { packed: CopyTaggedPtr::new(caller_bounds, reveal), unused_field: None }
|
||||
}
|
||||
|
||||
pub fn with_user_facing(mut self) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user