Remove constness from TraitPredicate
This commit is contained in:
parent
7637653b9f
commit
4fec845c3f
90 changed files with 446 additions and 390 deletions
|
@ -77,13 +77,6 @@ impl<'tcx> PredicateObligation<'tcx> {
|
|||
recursion_depth: self.recursion_depth,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn without_const(mut self, tcx: TyCtxt<'tcx>) -> PredicateObligation<'tcx> {
|
||||
if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred)) = self.predicate.kind().skip_binder() && trait_pred.is_const_if_const() {
|
||||
self.predicate = tcx.mk_predicate(self.predicate.kind().map_bound(|_| ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_pred.without_const()))));
|
||||
}
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> PolyTraitObligation<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue