1
Fork 0

Use a dummy outlives requirement for where Type:, (see #53696)

A `WF(Type)` predicate was used previously, which did not play
well with implied bounds in chalk.
This commit is contained in:
scalexm 2018-11-01 15:09:02 +01:00
parent 156a932eef
commit 79b6c41bc2
4 changed files with 20 additions and 20 deletions

View file

@ -1325,15 +1325,10 @@ impl<'a> Clean<WherePredicate> for ty::Predicate<'a> {
Predicate::RegionOutlives(ref pred) => pred.clean(cx),
Predicate::TypeOutlives(ref pred) => pred.clean(cx),
Predicate::Projection(ref pred) => pred.clean(cx),
Predicate::WellFormed(ty) => {
// This comes from `where Ty:` (i.e. no bounds) (see #53696).
WherePredicate::BoundPredicate {
ty: ty.clean(cx),
bounds: vec![],
}
}
Predicate::ObjectSafe(_) => panic!("not user writable"),
Predicate::ClosureKind(..) => panic!("not user writable"),
Predicate::WellFormed(..) |
Predicate::ObjectSafe(..) |
Predicate::ClosureKind(..) |
Predicate::ConstEvaluatable(..) => panic!("not user writable"),
}
}