Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk"
This reverts commitff2439b7b9
, reversing changes made to2a9e0831d6
.
This commit is contained in:
parent
c5f8788d8d
commit
84b1d859c8
49 changed files with 400 additions and 424 deletions
|
@ -69,6 +69,16 @@ 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue