Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"

This reverts commit 18bb8c61a9, reversing
changes made to d9baa36190.
This commit is contained in:
Santiago Pastorino 2021-12-03 10:11:21 -03:00
parent 3e21768a0a
commit 85b723c4e6
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
49 changed files with 428 additions and 376 deletions

View file

@ -69,16 +69,6 @@ impl PredicateObligation<'tcx> {
}
}
impl TraitObligation<'tcx> {
/// Returns `true` if the trait predicate is considered `const` in its ParamEnv.
pub fn is_const(&self) -> bool {
match (self.predicate.skip_binder().constness, self.param_env.constness()) {
(ty::BoundConstness::ConstIfConst, hir::Constness::Const) => true,
_ => false,
}
}
}
// `PredicateObligation` is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
static_assert_size!(PredicateObligation<'_>, 32);