Implement negative bounds
This commit is contained in:
parent
98c33e47a4
commit
6e01e910cb
33 changed files with 363 additions and 188 deletions
|
@ -42,8 +42,14 @@ impl<'tcx> Bounds<'tcx> {
|
|||
trait_ref: ty::PolyTraitRef<'tcx>,
|
||||
span: Span,
|
||||
constness: ty::BoundConstness,
|
||||
polarity: ty::ImplPolarity,
|
||||
) {
|
||||
self.predicates.push((trait_ref.with_constness(constness).to_predicate(tcx), span));
|
||||
self.predicates.push((
|
||||
trait_ref
|
||||
.map_bound(|trait_ref| ty::TraitPredicate { trait_ref, constness, polarity })
|
||||
.to_predicate(tcx),
|
||||
span,
|
||||
));
|
||||
}
|
||||
|
||||
pub fn push_projection_bound(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue